Package com.zopim.android.sdk.util
Class AppInfo
- java.lang.Object
-
- com.zopim.android.sdk.util.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 activitystatic 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 appstatic java.lang.String
getChatSdkName()
Gets default Chat SDK application name as defined in build.gradle in the SDK projectstatic java.lang.String
getChatSdkVersionName()
Gets the version of the SDK as defined in build.gradle
-
-
-
Method Detail
-
getApplicationName
public static java.lang.String getApplicationName(Context context)
Gets the host application name from android:name label in activityIf 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 appIf 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
-
-