Start the integration in less than 5 minutes.
IDE's File -> Project structure -> SDK Location
.
As next step update your project-level settings.gradle
file and dependencyResolutionManagement
section by the following:
build.gradle
add the following dependency:
Config
object also accepts Boolean debug
parameter. Set it to true
if you want to see LogCat output of the SDK. Make sure the parameter is false
for release builds.
Config
object as foregroundNotification
parameter.
Make sure to ask user for notification permission if device runs Android 13 or later.
Below you can find sample code for creating notification channel and Notification
itself.
Creating a notification channel using NotificationManagerCompat
:
onError
callback will be invoked when something happens that prevents SDK from operating, e.g. API KEY authorization fails, device storage gets full, etc.
Possible error codes:
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 | Permission to post notification is not granted which means that Foreground service cannot be started |
SENSORS_NOT_WORKING | Some sensors are not wokring as intented. Error message should indicate if any required permissions are missing |
askPermissions
callback will be invoked based on necesarry permissions for enabled sensors in remote configuration. At the moment, list of permission can include:
android.permission.READ_PHONE_STATE
android.permission.ACTIVITY_RECOGNITION
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_BACKGROUND_LOCATION
Config
in system’s status bar. Recording will continue even when app exits.