Overview of the functionality of the SDK.
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_STATEandroid.permission.ACTIVITY_RECOGNITIONandroid.permission.ACCESS_COARSE_LOCATIONandroid.permission.ACCESS_FINE_LOCATIONandroid.permission.ACCESS_BACKGROUND_LOCATIONConfig in system’s status bar. Recording will continue even when app exits.