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:
Start Recording
init() on its own does not start recording. A recording that was started is resumed automatically the next time the app initializes the SDK, so a restart or an app update does not lose it. To have the SDK start on its own instead, configure delayAutoStartRecording — see Recording lifecycle.
Changed in 1.6.0. Releases 1.3.0 through 1.5.x started recording on
init() by default. If your app relied on that, pass delayAutoStartRecording(SdkConfiguration.AUTO_START_ON_INIT).Stop Recording
Check Recording Status
Device ID
Get the unique device identifier (available after initialization):Log Metadata
Log standardized delivery/pickup event metadata:logMetadata(Map<String, String>) overload is deprecated. Use logMetadata(StandardMetadata) instead.
For advanced metadata management with templates and tags, see the metadata chapter.
Statistics API
Monitor upload and sensor health:Deinitialize SDK
deinitialize(), the SDK instance becomes unusable. You must call init() again to use the SDK.