For the complete documentation index, see llms.txt. This page is also available as Markdown.

SDK Status

Learn what each SDK status field means, and how to use them to find out why detections are blocked.

The SDK status describes whether the Sentiance SDK is able to perform detections, and if it is not, what is preventing it. Every field reflects the current state of the device, the user, and your app's permissions.

To retrieve the status, or to subscribe for updates when it changes, check out SDK Status Updates.


Detection Status

This is the field to check first. The other fields explain how it got its value.

Value
Meaning

ENABLED_AND_DETECTING

Detections are enabled and running. Nothing is blocking the SDK.

ENABLED_BUT_BLOCKED

Detections are enabled, but something on the device is preventing them. Check the fields below to find out what.

DISABLED

Detections have not been enabled. Call enableDetections().

EXPIRED

Detections were enabled with an expiry date that has passed. Call enableDetections() again.

A status of ENABLED_AND_DETECTING means the SDK is able to detect, not that a transport is currently in progress. The SDK detects when the user starts moving.


Permissions and Device Settings

These fields report the conditions that most commonly block detections. The Blocks detections column indicates whether the SDK stops detecting when the condition is not met.

Field
Platform
Blocks detections
Meaning

locationPermission

iOS, Android

Yes

ALWAYS, ONLY_WHILE_IN_USE or NEVER. Must be ALWAYS for detections to run.

isPreciseLocationAuthorizationGranted

iOS, Android

Yes

False when the user granted approximate location only. Detections require precise location.

isLocationAvailable

iOS, Android

Yes

False when location services are turned off device-wide.

locationSetting

Android

Yes

OK, BATTERY_SAVING, DEVICE_ONLY or DISABLED. Anything other than OK reduces or prevents detections.

isAirplaneModeEnabled

Android

Yes

True while the device is in airplane mode.

isActivityRecognitionPermGranted

iOS, Android

No

Motion & Fitness on iOS, Activity Recognition on Android. Optional, but improves detection quality.

backgroundRefreshStatus

iOS

No

AVAILABLE, DENIED or RESTRICTED. Reports whether Background App Refresh is available to your app.

For guidance on requesting these permissions, check out this page.


Battery and Background Restrictions

Detections depend on the SDK being allowed to run in the background. These fields report the restrictions that affect it.

Field
Platform
Blocks detections
Meaning

isBackgroundProcessingRestricted

Android

Yes

True when the user has restricted background activity for your app.

isBatterySavingEnabled

iOS, Android

No

True while the device is in a power saving mode, which limits background work.

isBatteryOptimizationEnabled

Android

No

True when your app is subject to battery optimization. Check out this page for the implications.

isSchedulingExactAlarmsPermitted

Android

No

Whether your app may schedule exact alarms. Not required, but when permitted it improves the timeliness of the SDK's background work.


Hardware and Platform Requirements

Field
Platform
Blocks detections
Meaning

isGooglePlayServicesMissing

Android

Yes

True when Google Play Services is unavailable. The SDK relies on it for Fused Location and Geofencing.

isGyroPresent

iOS, Android

No

Whether a gyroscope is present on the device. Optional, but when present it improves detection quality.

isAccelPresent

iOS, Android

Whether an accelerometer is present on the device.

isGpsPresent

iOS, Android

Whether GPS hardware is present on the device.

canMonitorGeofences

iOS, Android

Whether the SDK is able to monitor geofences. Both platforms limit how many an app may set, as described on the Android and iOS requirements pages.


SDK and User State

Field
Platform
Blocks detections
Meaning

isRemoteEnabled

iOS, Android

Yes

False when detections have been disabled remotely for this app or user. Contact Sentiance if this is unexpected.

userExists

iOS, Android

Yes

Whether a Sentiance user exists on this device. Check out this page for details.

canDetect

iOS, Android

Whether the SDK is currently able to perform detections.

startStatus

iOS, Android

Deprecated. Use detectionStatus instead.


Data Quotas

The SDK operates within quotas for the data it transmits and stores. Each field is OK, WARNING or EXCEEDED.

Field
Platform
Blocks detections
Meaning

diskQuotaStatus

iOS, Android

Yes

Data stored on the device, pending transmission. Detections stop while this quota is exceeded.

wifiQuotaStatus

iOS, Android

No

Data transmitted over Wi-Fi.

mobileQuotaStatus

iOS, Android

No

Data transmitted over the mobile network.


Diagnosing Blocked Detections

When the detection status is ENABLED_BUT_BLOCKED, check the fields marked as blockers above. The most common causes are:

  • Background location permission is not ALWAYS.

  • Precise location is not granted.

  • Location services are disabled on the device.

  • Background activity is restricted for your app, on Android.

  • Google Play Services is missing, on Android.

  • The disk quota is exceeded.


Check out SDK Status Updates to subscribe for changes to these fields.

Last updated