Assets for Android apps
To follow Google requirements we have to keep a push notification, However, you can customize the.
Assets for Android apps
The SDK keeps a foreground notification to comply with Android background execution requirements. You can customize the notification text and icons from your app resources.
Push notifications
The SDK foreground notification can be customized by overriding SDK resources in the host application.
You can customize strings used in SDK notifications. To update the text, create a string resource in your app with the relevant identifier:
<string name="<identifier>">NEW TEXT</string>
<string name="tracking_notification_title">Tracking</string>
Full list of resources :point_right: Android App Resources
AI agent integration skill
We provide an AI agent skill that helps integrate Damoov TelematicsSDK into Android applications. The skill can guide coding agents such as Claude Code, OpenAI Codex, and other AI coding tools through verified TelematicsSDK integration patterns, including dependency setup, lifecycle forwarding, tracking flows, tags, and migration away from deprecated APIs.
Skill repository: Mobile-Telematics/telematics-sdk-skills.
Notifications
<string name="app_name">Tracking</string>
<string name="tracking_notification_title">Tracking</string>
<string name="tracking_notification_is_work">Your trip is being scored.</string>
<string name="tracking_notification_is_not_work">Trip not in progress.</string>
<string name="tracking_notification_tracking_disabled">Tracking is disabled.</string>
<string name="tracking_notification_gps_disabled">GPS is disabled. Tap the notification to enable GPS and grant permissions.</string>
<string name="tracking_notification_location_disabled">Location permission is disabled. Tap the notification to grant permissions.</string>
<string name="tracking_notification_background_location_disabled">Background location permission is disabled. Tap the notification to grant permissions.</string>
<string name="tracking_notification_activity_recognition_disabled">Activity recognition permission is disabled. Tap the notification to grant permissions.</string>
<string name="tracking_notification_battery_optimization_enabled">Battery optimization is enabled. Tap the notification to disable optimization.</string>
<string name="tracking_notification_power_saving_enabled">Trips may not be recorded while battery saver is enabled.</string>
<string name="tracking_notification_looking_for_tracks_upload">Waiting for trip upload.</string>
<string name="tracking_notification_waiting_for_manual_start">Waiting for manual trip start.</string>
<string name="tracking_notification_processing">Processing…</string>
<string name="tracking_notification_unknown_state">Tracking status is unavailable.</string>
<string name="tracking_notification_channel_name">Tracker service</string>| Notification | Type | Trigger |
|---|---|---|
| Your trip is being scored. | Persistent. Android requirements | Active tracking. |
| Trip not in progress. | Persistent. Android requirements | No active tracking. SDK is in standby mode. |
| Tracking is disabled. | Damoov system notification | Tracking is disabled for the DeviceToken via API or Datahub. |
| GPS is disabled. Tap the notification to enable GPS and grant permissions. | Damoov system notification | A user disabled GPS access for the mobile app. |
| Location permission is disabled. Tap the notification to grant permissions. | Damoov system notification | A user denied or revoked location permissions for the mobile app. |
| Background location permission is disabled. Tap the notification to grant permissions. | Damoov system notification | A user denied or revoked background location permission for the mobile app on Android 10+. |
| Activity recognition permission is disabled. Tap the notification to grant permissions. | Damoov system notification | A user denied or revoked activity recognition permission for the mobile app. |
| Battery optimization is enabled. Tap the notification to disable optimization. | Damoov system notification | Battery optimization is enabled for the mobile app. |
| Trips may not be recorded while battery saver is enabled. | Damoov system notification | A user enabled low power mode. |
| Waiting for trip upload. | Damoov system notification | Trip recorded, but not sent to Damoov platform. |
| Waiting for manual trip start. | Persistent. Android requirements | Tracking is enabled, but automatic trip recording is disabled and no manual trip is in progress. |
| Processing… | Damoov system notification | SDK notification state cannot be resolved from the current tracking, permission, or power state. |
tracking_notification_channel_name customizes the Android notification channel name shown in system settings. The channel ID is intentionally not customizable or localized because Android requires it to remain stable.
tracking_notification_unknown_state is retained as a resource key for compatibility, but the current SDK fallback notification uses tracking_notification_processing.
[Important] Starting from Android 12, the Persistent Notifications can be hidden. Code example
Custom notification icons
Important: You can add your own icon to the notification. Place your own icons to
res/drawablefolders with the following names:
ic_tracking_sdk_status_bar.png - use a transparent square canvas with a white icon/glyph and an alpha channel. Do not use a filled white square, square background, or square frame. Android uses this small icon in the status bar and may also use it when notifications are grouped by the system.
ic_tracking_sdk_notification.png - use a colored square image with an alpha channel. Android uses this as the large notification icon when the notification layout supports it.
For Android small icon requirements, see the official Android documentation for setSmallIcon() and notification design.
For Flutter applications, add these files to the native Android project resources, for example android/app/src/main/res/drawable/. Notification grouping is controlled by Android System UI or the device manufacturer UI. The SDK does not provide a separate icon for the automatically generated grouped notification view.
If your application sends its own notifications and a white square appears only in the automatically generated grouped notification header, the issue is not caused by the SDK notification icon. Android System UI or the device manufacturer UI generates the notification group header and may use the host application's launcher icon resources for that header.
Android System UI may use the host application's monochrome launcher icon for the automatically generated notification group header. In this case, if the application's monochrome launcher icon points to an asset with a non-transparent square canvas, Android renders it as a white square in the grouped notification.
The SDK small notification icon is used for the SDK notification itself. However, the grouped notification header is generated by Android/System UI and may depend on the host application's icon resources.
Recommended checks on the application side:
- Verify the app's adaptive icon
monochromeresource. - Make sure it uses a transparent canvas with only the white glyph or icon shape.
- Avoid filled square backgrounds, square frames, or non-transparent launcher foreground assets for the monochrome icon.
Example:
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Wizard screens UI overview
The permission wizard contains a separate set of screens for different phone models. there are 8 screens in total.
The Wizard is a set of user-friendly screens with a step-by-step description of each required permission and the button 'Proceed " to call the request. i.e. wizard for Android 10 is below:
The permission wizard supports flexible UX parameters, including the parameter when users are enforced to grant permissions.
Two customizable parameters are available;
1. EnableAggressivePermissionsWizard (EAPW):
true - user can't close the wizard screen
false** - user can close the wizard, including the option with "back button".
- EnableAggressivePermissionsWizardPage (EAPW-page);
true - user can't switch to the next screen without granting necessary permissions.
false - user can switch to the next screen/ complete wizard with rejected permissions.
The table below shows possible combinations and outcomes.
| EAPW (1) | EAPW-page (2) | Wizard can be closed | Can proceed w/o granted permissions | Can complete wizard w/o granted permissions |
|---|---|---|---|---|
| TRUE | TRUE | NO | NO | NO |
| TRUE | FALSE | NO | YES | NO |
| FALSE | FALSE | YES | NO | NO |
| FALSE | FALSE | YES | YES | YES |
Setting up
This part is taken from Android SDK installation . if you are already done with this part, you can skip it :point_down:
To start the Permission Wizard from your activity or fragment, please use the code below :point_down:
startActivityForResult(
PermissionsWizardActivity
.getStartWizardIntent(
context = this,
enableAggressivePermissionsWizard = false,
enableAggressivePermissionsWizardPage = false
),
PermissionsWizardActivity.WIZARD_PERMISSIONS_CODE
)After that, handle the result in onActivityResult:
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
// don’t forget to call here and in all base activity/fragments
if (requestCode == PermissionsWizardActivity.WIZARD_PERMISSIONS_CODE) {
when (resultCode) {
WIZARD_RESULT_ALL_GRANTED -> {
/* when user finished wizard with all required permissions
granted - enable SDK if Device ID is exist*/
enableSDK()
}
WIZARD_RESULT_CANCELED -> {
// when user canceled wizard
Toast.makeText(this, "Wizard closed!",
Toast.LENGTH_SHORT).show()
}
WIZARD_RESULT_NOT_ALL_GRANTED -> {
/* when user finished wizard with not all required permissions
granted*/
Toast.makeText(this, "NOT All Required Permissions Granted!",
Toast.LENGTH_SHORT).show()
}
}
}
}Common style
All resources support Html-markup styling. Also you can set custom fonts or font for a part of text via annotations
Directory;
- :point_right: Font
- :point_right: Font Size
- :point_right: Image resources
- :point_right: Colors
- :point_right: Dimens
Font
- Specify your font in resources (check documentation)
- Specify annotation for the text with name font
Sample: Add custom a Font library
Resource
- digital_font.xml
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
<font app:font="@font/digital" />
</font-family>Add the <annotation> tag, and define the key-value pair. In this case, the key is font, and the value is the font resource name
<string name="wizard_telematics_gps_google_desc">Next, you will see a prompt to turn on <b>device location</b>, which uses <annotation font="digital">Google\'s</annotation> location service.\n\n
Select <b>OK</b> for the app to work correctly.
</string>Font size
- Add
dimenresource - Specify annotation for the text with name textSize
Sample Dimen-resource:
<dimen name="text_size">12sp</dimen>Add the <annotation> tag, and define the key-value pair. In this case, the key is textSize, and the value is the dimen-resource name
<string name="wizard_telematics_gps_google_desc">Next, you will see a prompt to turn on <b>device location</b>, which uses <annotation font="digital" textSize="text_size">Google\'s</annotation> location service.\n\n
Select <b>OK</b> for the app to work correctly.
</string>Image resources
If you don't want to use our bottom dialog view you can replace it with your own drawable resource:
Specify drawable resource with the name:
// location permission screen image
ic_wizard_image_location
// background location permission screen image
ic_wizard_image_location_background
// activity recognition permission screen image
ic_wizard_image_activity_recognition
// device location screen image
ic_wizard_image_gps_sensor
// battery optimization permission screen image
ic_wizard_image_battery_optimization
// huawei autostart permission screen image
ic_wizard_autostart_huawei
// xiaomi autostart permission screen image
ic_wizard_autostart_xiaomi
// default autostart permission screen image
ic_wizard_autostart_default
// notifications showing permission screen image
ic_wizard_notifications_defaultColors
Resources: values\colors.xml
Wizard
<!-- Wizard -->
<color name="colorTelematicsWizardBackground">#FAFAFA</color>
<color name="colorTelematicsWizardPrimaryText">#494949</color>
<color name="colorTelematicsWizardSecondaryText">#80464646</color>
<color name="colorTelematicsWizardButtonText">#fff</color>
<color name="colorTelematicsWizardButtonNorm">#80464646</color>
<color name="colorTelematicsWizardButtonPressed">#464646</color>Alert dialog inside wizard - common colors
<!-- Alert dialog inside wizard - common colors -->
<color name="colorTelematicsDialogAlertBackground">#fff</color>
<color name="colorTelematicsDialogAlertButtonActiveBg">#ff8400</color>
<color name="colorTelematicsDialogAlertText">#80464646</color>
<color name="colorTelematicsDialogAlertButtonActiveText">#fff</color>for Android <= 9
<!-- Alert dialog inside wizard for Android =< 9 -->
<color name="colorTelematicsDialogAlertInactiveText">#009687</color>for Android 10+
<!-- Alert dialog inside wizard for Android >= 10 -->
<color name="colorTelematicsDialogAlertInactiveTextQ">#a7c7f9</color>Dimens
Resources:
- values\dimens.xml
- values-xhdpi\dimens.xml
- values-xxhdpi\dimens.xml
DialogFragment SDK resources
<!-- Overridden DialogFragment SDK resources -->
<dimen name="dialog_telematics_view_bubble_corners">20dp</dimen>
<dimen name="dialog_telematics_button_corners">35dp</dimen>Wizard SDK resources
<!-- Overridden Wizard SDK resources -->
<dimen name="wizard_telematics_button_corners">5dp</dimen>Content customization:
Title for all screens
<string name="wizard_telematics_attention">Attention Required</string>Location permission
Android location permission wording differs by OS version. Customize the relevant resource in each values directory:
- values/strings.xml
- values-v29/strings.xml
- values-v30/strings.xml
- values-v31/strings.xml
<!-- Generic location permission description -->
<string name="wizard_telematics_location_desc">Next, you will see a prompt to grant <b>location</b> permission.\n\n
The app uses your location data to automatically record trips in the background, determine when trips start and end, and calculate your driving score.\n\n
Select <b>Allow</b> in the next prompt.
</string>
<!-- Bottom dialog before the app name text-->
<string name="wizard_telematics_attention_dialog_location_before">Allow</string>
<!-- Bottom dialog after the app name text -->
<string name="wizard_telematics_attention_dialog_location_after">to\naccess this device\'s location?</string><!-- Android 10 location permission description -->
<string name="wizard_telematics_location_desc">Next, you will see a prompt to grant <b>location</b> permission.\n\n
The app uses your location data to automatically record trips in the background, determine when trips start and end, and calculate your driving score.\n\n
Select <b>Allow all the time</b> in the next prompt.
</string>
<!-- Bottom dialog after the app name text-->
<string name="wizard_telematics_attention_dialog_location_after">to access this device\'s location?</string><!-- Android 11 location permission description -->
<string name="wizard_telematics_location_desc">As the next step, you’ll see a popup to grant app access to <b>location services</b>.\n\n
The app uses your location data to automatically record your trips in background, determine when you have started and ended your trip and to measure your score.\n\n
The app will not work without this permission.\n\n
On the next popup, please select <b>While using the app</b>.
</string><?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="wizard_telematics_attention_dialog_background_location_before">Allow </string>
<string name="wizard_telematics_attention_dialog_background_location_after">to access this device\'s location?</string>
<string name="wizard_telematics_location_desc">As the next step, you'll see a popup to grant app access to <b>location services</b>.\n\n
The app uses your location data to automatically record your trips in background, determine when you have started and ended your trip and to measure your score.\n\n
The app will not work without this permission.\n\n
On the next popup, please select <b>Precise</b> and <b>While using the app</b>.
</string>
</resources>Background location
Since Android 11 Google introduced new privacy requirements related to location permission. Now if the application needs access to user location in the background it should first grant access to foreground location and only then, it can ask permission to access location in the background.
- values/strings.xml
<!-- background location permission description -->
<string name="wizard_telematics_background_location_desc">
Next, grant <b>background location</b> access.\n\n
The app uses your location data to automatically record trips in the background, determine when trips start and end, and calculate your driving score.\n\n
The app will not work without this permission.\n\n
Open app settings and select <b>Allow all the time</b> on the location permission screen.</string>
<!-- Additional text in the bottom dialog -->
<string name="wizard_telematics_location_additional_description">This app needs access to your location all the time, even when you\'re not using it. <font color="#a7c7f9"><u>Allow in settings.</u></font></string>
<!-- Dialog text before app name -->
<string name="wizard_telematics_attention_dialog_background_location_before">Change location access for </string>
<!-- Dialog text after app name -->
<string name="wizard_telematics_attention_dialog_background_location_after">\?</string>
<!-- Dialog text to keep permission in "While using the app" -->
<string name="wizard_telematics_location_additional_keep">Keep \'While using the app\'</string>Activity recognition (since Android 10)
- values/strings.xml
- values-v29/strings.xml
<!-- Wizard activity recognition section -->
<string name="wizard_telematics_activity_recognition_desc">Next, you will see a prompt to grant access to your <b>physical activity</b>.\n\n
The app uses this information to calculate your driving score.\n\n
Select <b>Allow</b> in the next prompt.
</string>
<!-- Bottom dialog before the app name text-->
<string name="wizard_telematics_attention_dialog_activity_recognition_before">Allow</string>
<!-- Bottom dialog after the app name text-->
<string name="wizard_telematics_attention_dialog_activity_recognition_after">to\naccess your physical activity?</string><!-- Bottom dialog after the app name text-->
<string name="wizard_telematics_attention_dialog_activity_recognition_after">to access your physical activity?</string>Device location services
The popup call when location services are switched off on the device (not on application)
- values/strings.xml
<!-- Gps services description -->
<string name="wizard_telematics_gps_google_desc">Next, you will see a prompt to turn on <b>device location</b>, which uses Google\'s location service.\n\n
Select <b>OK</b> for the app to work correctly.
</string>
<string name="wizard_telematics_attention_dialog_gps_google">For a better experience, turn on device location, which uses Google\'s location service.</string>
<string name="dialog_telematics_attention_dialog_gps_google_ok">OK</string>
<string name="dialog_telematics_attention_dialog_gps_google_no">No, thanks</string>Battery optimization
- values/strings.xml
<string name="wizard_telematics_ignore_system_battery_optimization_desc">Next, you will see a prompt to ignore <b>battery optimizations</b>.\n\n
Select <b>ALLOW</b> for the app to work correctly.
</string>
<string name="wizard_telematics_attention_dialog_battery">Let the app always run in the background?\n\nAllowing the app to always run in the\nbackground may reduce battery life.\n\nYou can change this later in\nSettings > Apps & notifications.</string>
<string name="dialog_telematics_attention_dialog_battery_ok">ALLOW</string>
<string name="dialog_telematics_attention_dialog_battery_no">DENY</string>Power management
Affected devices:
- Samsung
- Xiaomi,
- OPPO
- Huawei,
- etc
Resources:
- values/strings.xml
<string name="wizard_telematics_extra_power_management_desc">Tap <b>Proceed</b> to open settings and configure <b>power management</b>.\n
Disable power management for the app to work correctly.
</string>Autostart enable
Affected devices:
- Xiaomi,
- OPPO
- Huawei,
- etc
Resources:
- values/strings.xml
<string name="wizard_telematics_extra_autostart_desc">Tap <b>Proceed</b> to open settings and configure <b>autostart</b>.\n
Enable autostart for the app to work correctly.</string>Notifications
Resources
- values/strings.xml
<string name="wizard_telematics_extra_notifications_desc">Tap <b>Proceed</b> to open settings and configure <b>notifications</b>.\n
Enable all notifications for the app to work correctly.</string>Additional resources
Resources
- values/strings.xml
<!-- Bottom proceed button resource -->
<string name="wizard_telematics_show_request">Proceed</string>
<!-- Allow button resource -->
<string name="wizard_telematics_deny">Deny</string>
<!-- Deny button resource -->
<string name="wizard_telematics_allow">Allow</string>
<!-- Allow all the time resource -->
<string name="wizard_telematics_allow_all_time">Allow all the time</string>
<!-- Allow only while using the app resource -->
<string name="wizard_telematics_allow_while_using">Allow only while using the app</string>
<!-- Steps resource in the top of wizard. !Important! FORMAT SHOULD BE THE SAME! -->
<string name="wizard_telematics_step">Step %1s of %2s</string>
<string name="wizard_telematics_please_grant">Please grant all required permissions.</string>
<!-- Android 11 new resources-->
<string name="wizard_telematics_while_using_11">While using the app</string>
<string name="wizard_telematics_only_this_time">Only this time</string>
<string name="wizard_telematics_ask_every_time">Ask every time</string>Permission status popup
Overview
Permissions status Dialog is a DialogFragment (non-fullscreen popup window) with buttons to call system permissions and show the current status
To call the dialog from your activity or fragment, you have to use the following code:
private var permsFragment: PermissionsDialogFragment? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
permsFragment = PermissionsDialogFragment.newInstants(dismissIfAllGranted =
false)
permsFragment?.setPermissionsGrantedListener(object :
PermissionsDialogFragment.PermissionsGrantedListener {
override fun onGrantedStatus(allPermsGranted: Boolean) {
if (allPermsGranted) enableSDK() // enabled SDK if not enabled
}
})
}
private fun showPermissionsDialog() {
permsFragment?.let {
if (!permsFragment!!.isVisible) permsFragment?.show(supportFragmentManager, PermissionsDialogFragment.PERMISSION_FRAGMENT_TAG)
}
}if dismissIfAllGranted
- true - the dialog will be dismissed (closed) automatically when all permissions are granted.
- false - the dialog won't be closed even with all permissions are granted, it can be closed by users.
Color
Resources: values\colors.xml
<!-- Permission Dialog Fragment -->
<color name="colorTelematicsDialogBackground">#fff</color>
<color name="colorTelematicsDialogPrimaryText">#494949</color>
<color name="colorTelematicsDialogSecondaryText">#80464646</color>
<color name="colorTelematicsDialogButtonText">#494949</color>
<color name="colorTelematicsDialogButtonNorm">#fff</color>
<color name="colorTelematicsDialogButtonPressed">#80464646</color>Dimens
Resources:
- values\dimens.xml
- values-xhdpi\dimens.xml
- values-xxhdpi\dimens.xml
<!-- Overridden DialogFragment SDK resources -->
<dimen name="dialog_telematics_view_bubble_corners">20dp</dimen>
<dimen name="dialog_telematics_button_corners">35dp</dimen><!-- Overridden Wizard SDK resources -->
<dimen name="wizard_telematics_button_corners">5dp</dimen>Drawables
Resources: values/drawable-xxxhdpi

