Driver Notifications
The Nav SDK UX Framework allows for notifications to warn drivers about trip events as they navigate. The following notification types are available:
- EV trip monitoring notifications
- Road cameras notifications
- Road incident notifications
- Faster route notifications
- Border crossing notifications
- Slow traffic notifications
You can configure each notification type with available options.
EV trip monitoring
EV trip notifications suggest reviewing a better EV route when the predicted State of Charge changes unexpectedly. This may occur due to driving conditions, driving style, and other factors. A better route can help the driver arrive faster, avoid unnecessary charging stops, and make sure the route meets minimum State of Charge expectations at destination. Set evTripNotification
to customize EV trip notifications.
Dash.init(
applicationContext = applicationContext,
accessToken = getString(R.string.mapbox_access_token)
) {
evTripNotification {
evBetterRouteNotificationFreeze = 10.minutes
}
}
Option | Default | Description |
---|---|---|
evBetterRouteNotificationFreeze | 10 minutes | Time interval before displaying a new notification since the last one appeared. |
Road cameras
Road camera notifications warn drivers about upcoming road cameras (speed cameras, red light cameras, cameras for tracking average speed inside the zone). Set roadCameraNotification
to customize road camera notifications.
Dash.init(
applicationContext = applicationContext,
accessToken = getString(R.string.mapbox_access_token)
) {
roadCameraNotification {
distanceToCamera = 500.0
withSound = true
}
ui {
includeRoadCameras = listOf(
RoadCameraType.SPEED_CAMERA,
RoadCameraType.SPEED_CAMERA_RED_LIGHT,
RoadCameraType.RED_LIGHT,
RoadCameraType.SPEED_CONTROL_ZONE_EXIT,
RoadCameraType.SPEED_CONTROL_ZONE_ENTER,
RoadCameraType.SPEED_CONTROL_ZONE_MIDDLE,
RoadCameraType.DANGER_ZONE_ENTER,
RoadCameraType.DANGER_ZONE_EXIT
)
}
}
Option | Default | Description |
---|---|---|
distanceToCamera | 1000 meters | Maximum distance in meters ahead the camera when notification appears. |
withSound | True | Toggle sound for road camera notifications. |
includeRoadCameras | All available camera types | List of the camera types to include in notifications. |
Road incidents
Road incident notification warns driver about upcoming incidents or events on the road (lane restrictions, constructions, etc.). Set incidentNotification
to customize incidents notification.
Dash.init(
applicationContext = applicationContext,
accessToken = getString(R.string.mapbox_access_token)
) {
incidentNotification {
distanceToIncident = 500.0
timeToDismiss = 15.seconds
enabledIncidentTypes = setOf(
DashIncidentType.CONSTRUCTION,
DashIncidentType.LANE_RESTRICTION,
...
)
withSound = true
}
}
Option | Default | Description |
---|---|---|
distanceToIncident | 500 meters | Maximum distance (in meters) ahead of the incident at which the notification appears. |
timeToDismiss | 15 seconds | Time until notification dismisses automatically. |
enabledIncidentTypes | Empty list (no incidents) | List of incident types to include in notifications. |
withSound | True | Toggle sound for the incident notification. |
Faster route
Faster route notification appears when faster route available. Set fasterRouteNotification
to customize faster route notification.
Dash.init(
applicationContext = applicationContext,
accessToken = getString(R.string.mapbox_access_token)
) {
fasterRouteNotification {
minFasterRouteDurationDiff = 10.minutes
fasterRouteNotificationFreeze = 30.minutes
}
}
Option | Default | Description |
---|---|---|
minFasterRouteDurationDiff | 10 minutes | Minimum time difference between the active route and the alternative route to trigger driver notification. |
fasterRouteNotificationFreeze | 30 minutes | Minimum time difference between the active route a potential alternative route to trigger a notification. |
Border crossing
Border crossing notifications appear when a driver approaches a country border. Set borderCrossingNotification
to customize border crossing notifications.
Dash.init(
applicationContext = applicationContext,
accessToken = getString(R.string.mapbox_access_token)
) {
borderCrossingNotification {
distanceToBorder = 500.0
}
}
Option | Default | Description |
---|---|---|
distanceToBorder | 500 meters | Maximum distance (in meters) ahead of a country border at which the notification appears. |
Slow traffic
Slow traffic notifications inform drivers about additional delays because of heavy traffic. Set slowTrafficNotification
enable slow traffic notifications.
Dash.init(
applicationContext = applicationContext,
accessToken = getString(R.string.mapbox_access_token)
) {
slowTrafficNotification {
minSlowTrafficDelay = 5.minutes
}
}
Option | Default | Description |
---|---|---|
minSlowTrafficDelay | Minimum delay caused by heavy traffic ahead to trigger a notification. |