SdkStatus
This class exposes the status of the Sentiance SDK. You can get an instance of this object in two ways.
Using
SdkStatusUpdateListeneras explained in the SDK Status Updates step of the quick start guide;using the
getSdkStatus()method.
A sample OnSdkStatusUpdateHandler implementation can be found on our Github.
SdkStatus API
detectionStatus
detectionStatusA
detectionStatusenum representing the detection status of the SDK.
startStatus (deprecated)
startStatus (deprecated)Deprecated
Use detectionStatus instead.
A
StartStatusenum representing the start state of the SDK detections.
canDetect
canDetectA synthesis of the following fields, indicating whether the conditions are suitable for the SDK to run its detections:
isRemoteEnabled
locationPermission
locationSetting
isGpsPresent
isGooglePlayServicesMissing
isAirplaneModeEnabled
isPreciseLocationPermGranted
isLocationAvailable
diskQuotaStatus
isBackgroundProcessingRestricted
isRemoteEnabled
isRemoteEnabledWhether the user is enabled on the Sentiance Platform. By default, all users are enabled on the Sentiance Platform. A user may get disabled during creation if, for example, the device is a tablet and the same user already exists on a phone. Sentiance can also disable users selectively under certain conditions (e.g. due to a misbehaving SDK).
An enabled user is required to do detections.
isPreciseLocationPermGranted
isPreciseLocationPermGrantedWhether the user has granted precise location permission to the app. See approximate location.
Precise location permission is required to do detections.
isActivityRecognitionPermGranted
isActivityRecognitionPermGrantedWhether the activity recognition permission has been granted.
locationSetting
locationSettingA
LocationSettingenum representing the location setting currently set in the device settings.A location setting of
OKis required to do detections.
isAirplaneModeEnabled
isAirplaneModeEnabledWhether the device is in airplane mode.
Airplane mode must be disabled to do detections.
isLocationAvailable
isLocationAvailableThe SDK's location availability state.
Generally, when the device location setting is in an acceptable state, and all required location related permissions are granted, this property will be
true. However, under certain conditions, location data may still be unavailable, in which case this property will befalse. Once location data becomes available again, the SDK will automatically update this property and resume detections if possible.Note that it can take up to 30 seconds for a change in the device's location settings or permission to take effect on SDK's location availability state.
isAccelPresent
isAccelPresentWhether the device has an accelerometer.
isGyroPresent
isGyroPresentWhether the device has a gyroscope.
isGpsPresent
isGpsPresentWhether the device has a GPS.
A GPS is required to do detections.
isGooglePlayServicesMissing
isGooglePlayServicesMissingWhether Google Play Services is missing.
Google Play Services is required to do detections.
isBatteryOptimizationEnabled
isBatteryOptimizationEnabledWhether battery optimization is enabled for the application.
On some devices, battery optimization can have a negative impact on apps running in the background. This is due to OEM specific customizations of Android's battery optimization feature. As such, disabling battery optimization is generally recommended for quality detections, if possible.
isBatterySavingEnabled
isBatterySavingEnabledWhether battery saving is enabled on the device.
When battery saving is enabled, it can have a negative impact on apps running in the background. As a result, SDK detection quality may be impacted.
isBackgroundProcessingRestricted
isBackgroundProcessingRestrictedWhether background processing is restricted for the application. This will be set to
falsefor devices running Oreo and lower.Unrestricted background processing is required to do detections.
isSchedulingExactAlarmsPermitted
isSchedulingExactAlarmsPermittedWhether scheduling exact alarms is permitted. This is normally permitted, unless the user has manually revoked the permission from the device settings. When the permission is not granted, it can have a negative impact on the detection quality.
locationPermission
locationPermissionA
LocationPermissionenum representing the location accessibility permission.Under most circumstances, an
ALWAYSpermission is required to do detections.
wifiQuotaStatus
wifiQuotaStatusA
QuotaStatusenum representing the WiFi quota status of the SDK.The actual usages and limits in bytes can be obtained using the
getWiFiQuotaUsage(),getWiFiQuotaLimit().Sentiance assigns a limited quota for the SDK to utilized over a period 30 days (sliding window). Once the quota is exceeded, data submission over WiFi stops. The default quota is 2048 MB, but is configurable by Sentiance.
mobileQuotaStatus
mobileQuotaStatusA
QuotaStatusenum representing the mobile data quota status of the SDK.The actual usages and limits in bytes can be obtained using the
getMobileQuotaUsage(),getMobileQuotaLimit().Sentiance assigns a limited quota for the SDK to utilized over a period of 30 days (sliding window). Once the quota is exceeded, data submission over mobile data stops. The default quota is 250 MB, but is configurable by Sentiance.
diskQuotaStatus
diskQuotaStatusA
QuotaStatusenum representing the disk quota status of the SDK.The actual usages and limits in bytes can be obtained using the
getDiskQuotaUsage(),getDiskQuotaLimit().Sentiance assigns a limited quota for the SDK to utilized. Once the quota is exceeded, SDK detections stop. The default quota is 128 MB, but is configurable by Sentiance.
Last updated