Setup and Maven Repository
Project requires Java 17. If necessary, adjust your Java version in your IDE, typically inIDE's File -> Project structure -> SDK Location.
Update your project-level settings.gradle file and dependencyResolutionManagement section:
Declare Dependency
Inside yourbuild.gradle add the following dependency:
Initialize SDK
SDK behaves like a singleton object that manages its own internal state. Initialize it in your Application class:Custom Foreground Notification
The SDK runs as a foreground service and shows a notification while recording. You can customize this notification using the SDK’s notification channel:Observing SDK Status
Use theobserveSdkStatus() Flow to monitor SDK state changes:
Error Codes
WhenStatus.Error is received, the errorCode indicates what went wrong:
| Error Code | Description |
|---|---|
| AUTHENTICATION_ERROR | API key is not valid, expired or revoked |
| UPLOAD_ERROR | Recordings couldn’t be uploaded after exhausting all attempts |
| STORAGE_FULL | Device storage is full which prevents saving sensor readings |
| MISSING_NOTIFICATION_PERMISSION | Notification permission not granted, foreground service cannot start |
| CONFIG_ERROR | Configuration error |
| TRAFFIC_USED_UP | All allotted traffic has been used |
| SENSORS_NOT_WORKING | Some sensors are not working. Check if permissions are missing |
Start Recording
Stop Recording
Check Recording Status
Device ID
Get the unique device identifier (available after initialization):Log Metadata
Statistics API
Monitor upload and sensor health:Deinitialize SDK
deinitialize(), the SDK instance becomes unusable. You must call init() again to use the SDK.