Better route notification
The EvBetterRouteNotificationProvider provides notifications for better electric vehicle (EV) route alternatives. It evaluates the primary and alternative routes to identify a better route based on the state of charge (SoC) and the presence of EV charging waypoints, and notifies the user when one exists. It triggers notification when the primary route cannot meet the expected SoC at the destination, but an alternative route can, considering the presence or absence of EV charging waypoints in both primary and alternative routes to determine the EvBetterRouteType of better alternative route.
The provider continues to send notifications even if the user selects a worse route. Now, filtering of this state should be handled by the application consuming this API.
1. Setup the DriverNotificationsManager
Learn how to setup Driver Notifications.
2. Attach the EvBetterRouteNotificationsProvider
val evBetterRouteNotificationProvider = EvBetterRouteNotificationProvider()
driverNotificationManager.attachDriverNotificationProvider(evBetterRouteNotificationProvider)
3. Receive better route notification
The EvBetterRouteNotification appears when a better alternative route comes based on the state of charge (SoC) and the presence of EV charging waypoints. It informs the driver or application when a more optimal route is available, considering EV-specific constraints such as battery level and charging stops.
| Data field | Description |
|---|---|
alternativeRoute | The alternative NavigationRoute that is considered better according to the evaluation criteria. |
betterRouteType | The value of the EvBetterRouteType, indicating the reason it is considered better (e.g., route doesn't require charging as opposed to the current active route). |
4. Analyze EvBetterRouteType
Analyze EvBetterRouteType type to provide enhanced user experience.
| Type | Description |
|---|---|
NO_ADDITIONAL_CHARGING | No additional charging required. Neither the primary nor the alternative route includes charging stations, but only the alternative satisfies the expected SoC at the destination. |
INCLUDE_ADDITIONAL_CHARGING | Includes additional charging. The primary route lacks charging stations and cannot meet the expected SoC, but the alternative adds charging stations to make sure the expected SoC is achieved. |
EXCLUDE_PLANNED_CHARGING | Excludes planned charging. The primary route includes charging stations, but the alternative excludes them while still ensuring the expected SoC at the destination satisfies. |
WITH_THE_SAME_CHARGING | With the same charging. Both the primary and alternative routes include charging stations, but only the alternative ensures the expected SoC at the destination, because the primary does not. |