Interface TripNotification
-
- All Implemented Interfaces:
public interface TripNotificationDefines a contract for Notification instance provider and manager. This notification is going to be used in a foreground service managed by a TripSession
-
-
Method Summary
Modifier and Type Method Description abstract NotificationgetNotification()Provides a custom Notification to launch with the TripSession, specifically android.app.Service.startForeground. abstract IntegergetNotificationId()An integer id that will be used to start this notification from TripSession with android.app.Service.startForeground. abstract UnitupdateNotification(RouteProgress routeProgress)If enabled, this method will be called every time a new RouteProgress is generated. abstract UnitonTripSessionStarted()Callback for when trip session is started via TripSession. abstract UnitonTripSessionStopped()Callback for when trip session is stopped via TripSession.
-
-
-
Method Detail
-
getNotification
abstract Notification getNotification()
Provides a custom Notification to launch with the TripSession, specifically android.app.Service.startForeground.
-
getNotificationId
abstract Integer getNotificationId()
An integer id that will be used to start this notification from TripSession with android.app.Service.startForeground.
-
updateNotification
abstract Unit updateNotification(RouteProgress routeProgress)
If enabled, this method will be called every time a new RouteProgress is generated.
This method can serve as a cue to update a Notification with a specific notification id.
- Parameters:
routeProgress- with the latest progress data
-
onTripSessionStarted
abstract Unit onTripSessionStarted()
Callback for when trip session is started via TripSession.start.
This callback may be used to perform post start initialization
-
onTripSessionStopped
abstract Unit onTripSessionStopped()
Callback for when trip session is stopped via TripSession.stop.
This callback may be used to clean up any listeners or receivers, preventing leaks.
-
-