public class AlertsManager extends Object
AlertsManager class.
class GetIncidentAlerts implements IIncidentsAlertListener {
public GetIncidentAlerts() {
AlertsManager alertManager = InrixCore.getAlertsManager();
IncidentAlertOptions alertOptions = new IncidentAlertOptions(alertManager
.getRefreshInterval(AlertsManager.ACTIONS.SMART_ALERT),
new IFilter<Incident>() {
@Override
public boolean isItemAllowed(Incident item) {
// filter the incident here and return true or false
}
});
alert = alertManager.createIncidentAlert(this, alertOptions);
}
@Override
public void onResult(List<Incident> data) {
// process results here. This function will be called by SDK
// periodically when there is a result
}
@Override
public void onError(Error error) {
// process error here
}
}
| Modifier and Type | Class and Description |
|---|---|
static class |
AlertsManager.AlertsManagerException
An exception that is thrown when there is an error with an
AlertsManager operation. |
static interface |
AlertsManager.IIncidentsAlertListener
Response listener for incident alerts.
|
static class |
AlertsManager.IncidentAlertOptions
|
static class |
AlertsManager.OnRouteStatus
The current status of user relative to the selected route.
|
static class |
AlertsManager.ParkingAlertOptions
Contains options that specify how to create alerts related to parking on a route.
|
static class |
AlertsManager.RouteAlertCallback
This class is the contract between RouteAlert and your application.
|
static class |
AlertsManager.RouteAlertOptions
Contains options that specify how to create incident alerts related to a route.
|
| Modifier and Type | Method and Description |
|---|---|
IncidentAlert |
createIncidentAlert(AlertsManager.IncidentAlertOptions options,
AlertsManager.IIncidentsAlertListener listener,
boolean useXDIncidents)
Sets up a recurring alert with the specified options and listener.
|
RouteAlert |
createRouteAlert(AlertsManager.RouteAlertOptions alertOptions,
AlertsManager.RouteAlertCallback routeAlertListener)
Sets up a recurring alerts related to a route with the specified options and listeners.
|
AlertsManagerConfig |
getConfiguration()
Gets the configuration for
AlertsManager. |
public AlertsManagerConfig getConfiguration()
AlertsManager.AlertsManagerConfig.public final IncidentAlert createIncidentAlert(AlertsManager.IncidentAlertOptions options, AlertsManager.IIncidentsAlertListener listener, boolean useXDIncidents)
options - Information on the alert to be created.listener - The listener that will receive the notifications about the new
incidents.useXDIncidents - true if incidents to be displayed are XD incidents, false otherwise.AlertsManager.AlertsManagerException - When either options or listener is null.public final RouteAlert createRouteAlert(AlertsManager.RouteAlertOptions alertOptions, AlertsManager.RouteAlertCallback routeAlertListener)
alertOptions - Options for the alerts.routeAlertListener - Listener for route requests, incident alerts etc.AlertsManager.AlertsManagerException - when either options or listeners are null.Copyright © 2013-2016 INRIX, Inc. All Rights Reserved.