TripNotification

interface TripNotification

Defines a contract for Notification instance provider and manager. This notification is going to be used in a foreground service managed by a TripSession

Functions

Link copied to clipboard
abstract fun getNotification(): Notification

Provides a custom Notification to launch with the TripSession, specifically android.app.Service.startForeground.

Link copied to clipboard
abstract fun getNotificationId(): Int

An integer id that will be used to start this notification from TripSession with android.app.Service.startForeground.

Link copied to clipboard
abstract fun onTripSessionStarted()

Callback for when trip session is started via TripSession.start.

Link copied to clipboard
abstract fun onTripSessionStopped()

Callback for when trip session is stopped via TripSession.stop.

Link copied to clipboard
abstract fun updateNotification(state: TripNotificationState)

This method can serve as a cue to update a Notification with a specific notification id.