-
public final class SystemParameterHelperHelper to retrieve Android system configuration.
-
-
Method Summary
Modifier and Type Method Description static StringgetBundleName(Context applicationContext)Return the bundle name of the application. static StringgetDeviceTimezone()Get the current device timezone. static StringgetDeviceLanguage()Get the current device language static StringgetDeviceCountry()Get the current device country static StringgetDeviceDate()Return the device date formatted with RFC 3339 format static LonggetFirstInstallDate(Context applicationContext)Get very first installation date. static LonggetLastUpdateDate(Context applicationContext)Get last update date. static LonggetDeviceInstallDate(Context context)Get the device install date. static StringgetDeviceBrand()Return the Brand name of the device static StringgetDeviceModel()Return the device model of the phone. static StringgetAppVersion(Context applicationContext)Return the current version of the application. static IntegergetAppVersionCode(Context applicationContext)Return the current version code of the application. static StringgetOSVersion()Return the version of Android of the phone. static StringgetBridgeVersion()Get the version of the Bridge currently using Batch if available static StringgetPluginVersion()Get the version of the Plugin currently using Batch if available static StringgetOSSdkLevel()Get the android sdk api level static StringgetSdkApiLevel()Get the batch sdk api level static StringgetSdkMessagingApiLevel()Get the batch sdk messaging api level static JSONObjectserializeSystemParameters(@NonNull() List<WatchedSystemParameter> parameters)Serialize a list of SystemParameter to a json object. -
-
Method Detail
-
getBundleName
@NonNull() static String getBundleName(Context applicationContext)
Return the bundle name of the application.
- Parameters:
applicationContext- The application context.
-
getDeviceTimezone
@Nullable() static String getDeviceTimezone()
Get the current device timezone.
-
getDeviceLanguage
@NonNull() static String getDeviceLanguage()
Get the current device language
-
getDeviceCountry
@NonNull() static String getDeviceCountry()
Get the current device country
-
getDeviceDate
@NonNull() static String getDeviceDate()
Return the device date formatted with RFC 3339 format
-
getFirstInstallDate
@Nullable() static Long getFirstInstallDate(Context applicationContext)
Get very first installation date.
- Parameters:
applicationContext- The application context.
-
getLastUpdateDate
@Nullable() static Long getLastUpdateDate(Context applicationContext)
Get last update date.
- Parameters:
applicationContext- The application context.
-
getDeviceInstallDate
@Nullable() static Long getDeviceInstallDate(Context context)
Get the device install date.
- Parameters:
context- Android's context to access shared preferences
-
getDeviceBrand
@Nullable() static String getDeviceBrand()
Return the Brand name of the device
-
getDeviceModel
@Nullable() static String getDeviceModel()
Return the device model of the phone.
-
getAppVersion
@Nullable() static String getAppVersion(Context applicationContext)
Return the current version of the application.
- Parameters:
applicationContext- The application context.
-
getAppVersionCode
@Nullable() static Integer getAppVersionCode(Context applicationContext)
Return the current version code of the application.
- Parameters:
applicationContext- The application context.
-
getOSVersion
@NonNull() static String getOSVersion()
Return the version of Android of the phone.
-
getBridgeVersion
@NonNull() static String getBridgeVersion()
Get the version of the Bridge currently using Batch if available
-
getPluginVersion
@NonNull() static String getPluginVersion()
Get the version of the Plugin currently using Batch if available
-
getOSSdkLevel
@NonNull() static String getOSSdkLevel()
Get the android sdk api level
-
getSdkApiLevel
@NonNull() static String getSdkApiLevel()
Get the batch sdk api level
-
getSdkMessagingApiLevel
@NonNull() static String getSdkMessagingApiLevel()
Get the batch sdk messaging api level
-
serializeSystemParameters
@NonNull() static JSONObject serializeSystemParameters(@NonNull() List<WatchedSystemParameter> parameters)
Serialize a list of SystemParameter to a json object.
This is used to send the payload of an _NATIVE_DATA_CHANGE event when a native data change.
- Parameters:
parameters- A list of system parameter
-
-
-
-