public class PreDriveNotification extends Object implements IPushNotification
| Modifier and Type | Class and Description |
|---|---|
static class |
PreDriveNotification.NotificationSource
PreDriveNotification.NotificationSource indicates the source of the PreDriveNotification. |
IPushNotification.PushNotificationType| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TEMPLATE_ID
Normal Template.
|
static String |
ROAD_CLOSURE_TEMPLATE_ID
Road Closure Template.
|
| Constructor and Description |
|---|
PreDriveNotification() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDestinationName()
Gets the name of the destination.
|
Integer |
getFuelLevel()
Gets fuel level, in percent (of
PreDriveNotification.getFuelTankCapacity()). |
Integer |
getFuelTankCapacity()
Gets fuel tank capacity, in gallons.
|
int |
getLeaveInMinutes()
Gets the number of minutes before the leave times.
|
Route |
getRoute()
Gets the route.
|
int |
getRouteQuality()
Gets the quality of the route, typically scaled from 0 (most congested) to 3 (least congested).
|
PreDriveNotification.NotificationSource |
getSource()
Gets the source of the push notification.
|
String |
getTemplateId()
Gets the push notification template id.
|
int |
getTravelTimeMinutes()
Gets the currently calculated travel time in minutes.
|
IPushNotification.PushNotificationType |
getType()
Gets the push notification type.
|
boolean |
hasRoadClosures()
Gets whether there are road closures along the route to the destination.
|
Boolean |
isLowFuel()
Gets whether the user's vehicle is low on fuel.
|
public static final String DEFAULT_TEMPLATE_ID
public static final String ROAD_CLOSURE_TEMPLATE_ID
public String getDestinationName()
public int getLeaveInMinutes()
public int getTravelTimeMinutes()
public int getRouteQuality()
| Value | Description | Travel Time |
|---|---|---|
| 0 | Stop and go | Greater than 175% of free flow traffic time. |
| 1 | Heavy | Between 150% and 175% of free flow traffic time. |
| 2 | Moderate | Between 125% and 150% of free flow traffic time. |
| 3 | Free flow | Less than 125% of free flow traffic time. |
| 255 | Closed | Route is unusable due to a closure or restriction on the route. |
public boolean hasRoadClosures()
true if the route has road closures, false otherwise.public Route getRoute()
Route will not contain any details until it is updated using RouteManager.getUpdatedRouteInfo(RouteManager.UpdatedRouteOptions, RouteManager.IUpdatedRouteListener).public IPushNotification.PushNotificationType getType()
getType in interface IPushNotificationpublic PreDriveNotification.NotificationSource getSource()
PreDriveNotification.NotificationSource.UNKNOWN if the
source cannot be determined.public String getTemplateId()
public Boolean isLowFuel()
true if the vehicle is low on fuel, false if the vehicle is not and
null if fuel information is not available for this user.public Integer getFuelTankCapacity()
null otherwise.PreDriveNotification.isLowFuel()public Integer getFuelLevel()
PreDriveNotification.getFuelTankCapacity()).null otherwise.PreDriveNotification.isLowFuel()Copyright © 2013-2016 INRIX, Inc. All Rights Reserved.