Class AppInfo



  • public class AppInfo
    extends java.lang.Object
    Helper class that provides common application information
    • Constructor Summary

      Constructors 
      Constructor and Description
      AppInfo() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getApplicationName(Context context)
      Gets the host application name from android:name label in activity
      static java.lang.String getApplicationStage(Context context)
      Gets the application build stage.
      static java.lang.String getApplicationVersionName(Context context)
      Gets the version of the host application as defined in the host app
      static java.lang.String getChatSdkName()
      Gets default Chat SDK application name as defined in build.gradle in the SDK project
      static java.lang.String getChatSdkVersionName()
      Gets the version of the SDK as defined in build.gradle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AppInfo

        public AppInfo()
    • Method Detail

      • getApplicationName

        public static java.lang.String getApplicationName(Context context)
        Gets the host application name from android:name label in activity

        If name can no be resolved a AppInfo.getChatSdkName() user will be returned.

        Parameters:
        context - from which to get the application name
        Returns:
        host application name
      • getChatSdkName

        public static java.lang.String getChatSdkName()
        Gets default Chat SDK application name as defined in build.gradle in the SDK project
        Returns:
        sdk app name
      • getApplicationVersionName

        public static java.lang.String getApplicationVersionName(Context context)
        Gets the version of the host application as defined in the host app

        If name can no be resolved an empty string will be returned.

        Parameters:
        context - from which to get the application version name
        Returns:
        app version name
      • getChatSdkVersionName

        public static java.lang.String getChatSdkVersionName()
        Gets the version of the SDK as defined in build.gradle
        Returns:
        chat SDK version
      • getApplicationStage

        public static java.lang.String getApplicationStage(Context context)
        Gets the application build stage.
        Parameters:
        context - of the application
        Returns:
        stage label