AI-generated Key Takeaways
-
SpeedAlertOptionsallows customization of speed alert triggering thresholds for MINOR and MAJOR severity levels. -
It defines thresholds as a percentage of the speed limit and a time duration for escalating from MINOR to MAJOR severity.
-
You can use
SpeedAlertOptionsto configure when and how speed alerts are triggered in navigation. -
It includes a builder class for creating
SpeedAlertOptionsinstances and provides methods to access the configured thresholds. -
The UI customization of triggered alerts can be further controlled using
SpeedometerUiOptions.
implements Parcelable
Encapsulates triggering thresholds for different severity levels of speed alerts, represented by
SpeedAlertSeverity.
You can use this class to customize the speed alert triggering thresholds as a percentage for
both SpeedAlertSeverity.MINOR and SpeedAlertSeverity.MAJOR alerts, and to
customize the time-based triggering threshold for SpeedAlertSeverity.MAJOR speed alert.
The speed alerts that are triggered by thresholds from this SpeedAlertOptions have
their UI customized in SpeedometerUiOptions.
Nested Class Summary
| class | SpeedAlertOptions.Builder | Builder for building SpeedAlertOptions. | |
Constant Summary
| float | UNKNOWN_PERCENTAGE | |
| double | UNKNOWN_TIME |
Inherited Constant Summary
Public Method Summary
| double |
getSeverityUpgradeDurationSeconds()
Returns the time in seconds needed to upgrade speed alerts from
SpeedAlertSeverity.MINOR to SpeedAlertSeverity.MAJOR. |
| float |
getSpeedAlertThresholdPercentage(SpeedAlertSeverity speedAlertSeverity)
Returns the speed alert triggering threshold as a percentage for the specified
SpeedAlertSeverity. |
Inherited Method Summary
Constants
public static final float UNKNOWN_PERCENTAGE
public static final double UNKNOWN_TIME
Public Methods
public double getSeverityUpgradeDurationSeconds ()
Returns the time in seconds needed to upgrade speed alerts from SpeedAlertSeverity.MINOR to SpeedAlertSeverity.MAJOR.
public float getSpeedAlertThresholdPercentage (SpeedAlertSeverity speedAlertSeverity)
Returns the speed alert triggering threshold as a percentage for the specified SpeedAlertSeverity.
Parameters
| speedAlertSeverity |
|---|