ManeuverNotificationTimingOptions (API Reference)
Class ManeuverNotificationTimingOptions
A class defining timing and distance thresholds for maneuver notifications.
Setting custom values will impact the time when the notification for each supported ManeuverNotificationType is sent - dependent on the TimingProfile.
Note: By default, notification thresholds depend on TimingProfile. When custom values are set, then these rules will still apply.
The following rules apply for all transport modes:
- For
TimingProfile.FAST_SPEEDtiming profile, if the current speed limit is less than 62 m/h (100 km/h), then the notification thresholds forTimingProfile.REGULAR_SPEEDtiming profile will be used instead. - For
TimingProfile.REGULAR_SPEEDtiming profile, if the current speed limit is less than 37 m/h (60 km/h), then the notification thresholds forTimingProfile.SLOW_SPEEDtiming profile will be used instead. - For
TimingProfile.SLOW_SPEEDtiming profile the thresholds will be always used as specified.
The timings follow a strict order:
ManeuverNotificationType.RANGE: The first notification, it may be very far away (use 0 for farthest or earliest possible notification).ManeuverNotificationType.REMINDER: The second notification.ManeuverNotificationType.DISTANCE: A second reminder notification to take action.ManeuverNotificationType.ACTION: Final notification, specifying the required action to be taken.
Therefore, it is crucial that the set values do not violate the order: range > reminder > distance > action.
For example, the following values are valid: range = 4000, reminder = 2500, distance = 1000, action = 400.
If rangeNotificationDistanceInMeters is smaller than reminderNotificationDistanceInMeters the new options will be
silently ignored and the previous values are kept.
You always have the choice to specify the thresholds for time or distance. For each ManeuverNotificationType a
notification is only sent once, so the value that is reached first, wins. However, it is recommended to always update both, time
and distance values.
A configuration value of 0 is only allowed for rangeNotificationDistanceInMeters and rangeNotificationTimeInSeconds.
It means that the maneuver notifications of type ManeuverNotificationType.RANGE should be generated as soon
as the maneuver location is known - no matter how far away it may be.
It's impossible for the other types to have 0 as value due to the descending ordering rule mentioned above.
You can also specify the doubleNotificationDistanceInMeters threshold that determines the distance between two maneuvers that
should be merged into a single maneuver notification, for example, when they are very close to each other. Maneuvers below this
threshold will be merged like in this example: "After 300 meters turn right and then turn left.".
Tip: To set the timings to the HERE SDK, you can first call getManeuverNotificationTimingOptions() to get the default values
for the desired combination of transport mode and timing profile. Then configure the timings, then set it back by calling the
setManeuverNotificationTimingOptions().
Note: In the comment of each attribute, the term Others refers to non-pedestrian transport modes such as
TransportMode.CAR, TransportMode.BICYCLE, TransportMode.TRUCK.
Attention: The default values for TransportMode.PEDESTRIAN on TimingProfile.FAST_SPEED are theoretical, as such
routes cannot be calculated with the HERE SDK as highways are forbidden for pedestrians.
Usage example:
// Get current values or default values, if no values have been set before.
ManeuverNotificationTimingOptions car_highway_timings = Navigator.getManeuverNotificationTimingOptions(TransportMode.CAR, TimingProfile.FAST_SPEED);
// Set a new value for a specific option and keep the previous or default values for the others.
car_highway_timings.distanceNotificationDistanceInMeters = 1500;
// Apply the changes to Navigator (or VisualNavigator).
Navigator.setManeuverNotificationTimingOptions(TransportMode.CAR, TimingProfile.FAST_SPEED, car_fast_speed_timings);
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe default distance setting forManeuverNotificationType.ACTIONnotification.intThe default time setting forManeuverNotificationType.ACTIONnotification.intThe default distance setting forManeuverNotificationType.DISTANCEnotification.intThe default time setting forManeuverNotificationType.DISTANCEnotification.intThe default distance setting for double notification.intThe default distance setting forManeuverNotificationType.RANGEnotification.intThe default time setting forManeuverNotificationType.RANGEnotification.intThe default distance setting forManeuverNotificationType.REMINDERnotification.intThe default time setting forManeuverNotificationType.REMINDERnotification. -
Constructor Summary
ConstructorsConstructorDescriptionManeuverNotificationTimingOptions(int rangeNotificationDistanceInMeters, int rangeNotificationTimeInSeconds, int reminderNotificationDistanceInMeters, int reminderNotificationTimeInSeconds, int distanceNotificationDistanceInMeters, int distanceNotificationTimeInSeconds, int actionNotificationDistanceInMeters, int actionNotificationTimeInSeconds, int doubleNotificationDistanceInMeters) Creates a new instance. -
Method Summary
-
Field Details
-
rangeNotificationDistanceInMeters
public int rangeNotificationDistanceInMetersThe default distance setting for
ManeuverNotificationType.RANGEnotification. A configuration value of 0 is only allowed forrangeNotificationDistanceInMetersandrangeNotificationTimeInSeconds. It means that the maneuver notifications of typeManeuverNotificationType.RANGEshould be generated as soon as the maneuver location is known - no matter how far away it may be.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED0 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED0 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED0 Others TimingProfile.FAST_SPEED0 Others TimingProfile.REGULAR_SPEED0 Others TimingProfile.SLOW_SPEED0 -
rangeNotificationTimeInSeconds
public int rangeNotificationTimeInSecondsThe default time setting for
ManeuverNotificationType.RANGEnotification. A configuration value of 0 is only allowed forrangeNotificationDistanceInMetersandrangeNotificationTimeInSeconds. It means that the maneuver notifications of typeManeuverNotificationType.RANGEshould be generated as soon as the maneuver location is known - no matter how far away it may be.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED0 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED0 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED0 Others TimingProfile.FAST_SPEED0 Others TimingProfile.REGULAR_SPEED0 Others TimingProfile.SLOW_SPEED0 -
reminderNotificationDistanceInMeters
public int reminderNotificationDistanceInMetersThe default distance setting for
ManeuverNotificationType.REMINDERnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED500 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED500 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED500 Others TimingProfile.FAST_SPEED2300 Others TimingProfile.REGULAR_SPEED800 Others TimingProfile.SLOW_SPEED600 -
reminderNotificationTimeInSeconds
public int reminderNotificationTimeInSecondsThe default time setting for
ManeuverNotificationType.REMINDERnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED40 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED40 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED40 Others TimingProfile.FAST_SPEED40 Others TimingProfile.REGULAR_SPEED40 Others TimingProfile.SLOW_SPEED40 -
distanceNotificationDistanceInMeters
public int distanceNotificationDistanceInMetersThe default distance setting for
ManeuverNotificationType.DISTANCEnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED100 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED100 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED100 Others TimingProfile.FAST_SPEED1300 Others TimingProfile.REGULAR_SPEED300 Others TimingProfile.SLOW_SPEED300 -
distanceNotificationTimeInSeconds
public int distanceNotificationTimeInSecondsThe default time setting for
ManeuverNotificationType.DISTANCEnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED18 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED18 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED18 Others TimingProfile.FAST_SPEED18 Others TimingProfile.REGULAR_SPEED18 Others TimingProfile.SLOW_SPEED18 -
actionNotificationDistanceInMeters
public int actionNotificationDistanceInMetersThe default distance setting for
ManeuverNotificationType.ACTIONnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED10 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED10 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED10 Others TimingProfile.FAST_SPEED400 Others TimingProfile.REGULAR_SPEED100 Others TimingProfile.SLOW_SPEED50 -
actionNotificationTimeInSeconds
public int actionNotificationTimeInSecondsThe default time setting for
ManeuverNotificationType.ACTIONnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED5 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED5 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED5 Others TimingProfile.FAST_SPEED5 Others TimingProfile.REGULAR_SPEED5 Others TimingProfile.SLOW_SPEED5 -
doubleNotificationDistanceInMeters
public int doubleNotificationDistanceInMetersThe default distance setting for double notification.
Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED20 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED20 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED20 Others TimingProfile.FAST_SPEED750 Others TimingProfile.REGULAR_SPEED250 Others TimingProfile.SLOW_SPEED150
-
-
Constructor Details
-
ManeuverNotificationTimingOptions
public ManeuverNotificationTimingOptions(int rangeNotificationDistanceInMeters, int rangeNotificationTimeInSeconds, int reminderNotificationDistanceInMeters, int reminderNotificationTimeInSeconds, int distanceNotificationDistanceInMeters, int distanceNotificationTimeInSeconds, int actionNotificationDistanceInMeters, int actionNotificationTimeInSeconds, int doubleNotificationDistanceInMeters) Creates a new instance.
- Parameters:
rangeNotificationDistanceInMeters-The default distance setting for
ManeuverNotificationType.RANGEnotification. A configuration value of 0 is only allowed forrangeNotificationDistanceInMetersandrangeNotificationTimeInSeconds. It means that the maneuver notifications of typeManeuverNotificationType.RANGEshould be generated as soon as the maneuver location is known - no matter how far away it may be.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED0 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED0 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED0 Others TimingProfile.FAST_SPEED0 Others TimingProfile.REGULAR_SPEED0 Others TimingProfile.SLOW_SPEED0 rangeNotificationTimeInSeconds-The default time setting for
ManeuverNotificationType.RANGEnotification. A configuration value of 0 is only allowed forrangeNotificationDistanceInMetersandrangeNotificationTimeInSeconds. It means that the maneuver notifications of typeManeuverNotificationType.RANGEshould be generated as soon as the maneuver location is known - no matter how far away it may be.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED0 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED0 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED0 Others TimingProfile.FAST_SPEED0 Others TimingProfile.REGULAR_SPEED0 Others TimingProfile.SLOW_SPEED0 reminderNotificationDistanceInMeters-The default distance setting for
ManeuverNotificationType.REMINDERnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED500 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED500 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED500 Others TimingProfile.FAST_SPEED2300 Others TimingProfile.REGULAR_SPEED800 Others TimingProfile.SLOW_SPEED600 reminderNotificationTimeInSeconds-The default time setting for
ManeuverNotificationType.REMINDERnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED40 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED40 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED40 Others TimingProfile.FAST_SPEED40 Others TimingProfile.REGULAR_SPEED40 Others TimingProfile.SLOW_SPEED40 distanceNotificationDistanceInMeters-The default distance setting for
ManeuverNotificationType.DISTANCEnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED100 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED100 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED100 Others TimingProfile.FAST_SPEED1300 Others TimingProfile.REGULAR_SPEED300 Others TimingProfile.SLOW_SPEED300 distanceNotificationTimeInSeconds-The default time setting for
ManeuverNotificationType.DISTANCEnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED18 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED18 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED18 Others TimingProfile.FAST_SPEED18 Others TimingProfile.REGULAR_SPEED18 Others TimingProfile.SLOW_SPEED18 actionNotificationDistanceInMeters-The default distance setting for
ManeuverNotificationType.ACTIONnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED10 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED10 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED10 Others TimingProfile.FAST_SPEED400 Others TimingProfile.REGULAR_SPEED100 Others TimingProfile.SLOW_SPEED50 actionNotificationTimeInSeconds-The default time setting for
ManeuverNotificationType.ACTIONnotification.Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED5 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED5 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED5 Others TimingProfile.FAST_SPEED5 Others TimingProfile.REGULAR_SPEED5 Others TimingProfile.SLOW_SPEED5 doubleNotificationDistanceInMeters-The default distance setting for double notification.
Transport Mode Timing Profile Default value TransportMode.PEDESTRIANTimingProfile.FAST_SPEED20 TransportMode.PEDESTRIANTimingProfile.REGULAR_SPEED20 TransportMode.PEDESTRIANTimingProfile.SLOW_SPEED20 Others TimingProfile.FAST_SPEED750 Others TimingProfile.REGULAR_SPEED250 Others TimingProfile.SLOW_SPEED150
-
-
Method Details