Skip to main content

Setup and Maven Repository

Project requires Java 17. If necessary, adjust your Java version in your IDE, typically in IDE's File -> Project structure -> SDK Location. Update your project-level settings.gradle file and dependencyResolutionManagement section:

Declare Dependency

Inside your build.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:
Make sure to ask user for notification permission if device runs Android 13 or later.

Observing SDK Status

Use the observeSdkStatus() Flow to monitor SDK state changes:

Error Codes

When Status.Error is received, the errorCode indicates what went wrong:

Start Recording

Starting the recording also starts the Foreground service and shows the notification. Recording continues even when the app exits. 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

Stopping recording also stops the Foreground service and removes the notification.

Check Recording Status

Device ID

Get the unique device identifier (available after initialization):

Log Metadata

Log standardized delivery/pickup event metadata:
The map-based 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

De-initialization stops recording if in progress and tears down the SDK. Warning: After calling deinitialize(), the SDK instance becomes unusable. You must call init() again to use the SDK.