public interface NavigationNotification
MapboxNavigationOptions
.Modifier and Type | Method and Description |
---|---|
Notification |
getNotification()
Provides a custom
Notification to launch
with the NavigationService , specifically
Service.startForeground(int, Notification) . |
int |
getNotificationId()
An integer id that will be used to start this notification
from
NavigationService with
Service.startForeground(int, Notification) . |
void |
onNavigationStopped(Context context)
Callback for when navigation is stopped via
MapboxNavigation.stopNavigation() . |
void |
updateNotification(RouteProgress routeProgress)
If enabled, this method will be called every time a
new
RouteProgress is generated. |
Notification getNotification()
Notification
to launch
with the NavigationService
, specifically
Service.startForeground(int, Notification)
.int getNotificationId()
NavigationService
with
Service.startForeground(int, Notification)
.void updateNotification(RouteProgress routeProgress)
RouteProgress
is generated.
This method can serve as a cue to update a Notification
with a specific notification id.
routeProgress
- with the latest progress datavoid onNavigationStopped(Context context)
MapboxNavigation.stopNavigation()
.
This callback may be used to clean up any listeners or receivers, preventing leaks.
context
- to be used if needed for Android-related work© 2019 Mapbox. All rights reserved.