Class TrimbleMapsTripNotification
-
- All Implemented Interfaces:
-
com.trimblemaps.navigation.base.trip.notification.TripNotification
public final class TrimbleMapsTripNotification implements TripNotificationDefault implementation of TripNotification interface
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classTrimbleMapsTripNotification.Companion
-
Field Summary
Fields Modifier and Type Field Description private final StringcurrentManeuverTypeprivate final StringcurrentManeuverModifierpublic final static TrimbleMapsTripNotification.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description TrimbleMapsTripNotification(NavigationOptions navigationOptions)
-
Method Summary
Modifier and Type Method Description final StringgetCurrentManeuverType()This indicates the type of current maneuver. final StringgetCurrentManeuverModifier()This indicates the mode of the maneuver. NotificationgetNotification()Provides a custom Notification to launch with the TripSession, specifically android.app.Service.startForeground. IntegergetNotificationId()An integer id that will be used to start this notification from TripSession with android.app.Service.startForeground. UnitupdateNotification(RouteProgress routeProgress)If enabled, this method will be called every time a new RouteProgress is generated. UnitonTripSessionStarted()Called when TripSession starts via TripSession. UnitonTripSessionStopped()Called when TripSession spos via TripSession.
-
-
-
Method Detail
-
getCurrentManeuverType
final String getCurrentManeuverType()
This indicates the type of current maneuver. The same BannerText.type of primary BannerInstructions
-
getCurrentManeuverModifier
final String getCurrentManeuverModifier()
This indicates the mode of the maneuver. The same BannerText.modifier of primary BannerInstructions
-
getNotification
Notification getNotification()
Provides a custom Notification to launch with the TripSession, specifically android.app.Service.startForeground.
-
getNotificationId
Integer getNotificationId()
An integer id that will be used to start this notification from TripSession with android.app.Service.startForeground.
-
updateNotification
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
Unit onTripSessionStarted()
Called when TripSession starts via TripSession.start
This callback may be used to perform any actions after the trip session is initialized.
-
onTripSessionStopped
Unit onTripSessionStopped()
Called when TripSession spos via TripSession.stop
This callback may be used to clean up any listeners or receivers, preventing leaks.
-
-