Driver's Alert
Alert events are assistant messages on the predicted path where the vehicle could drive along. They could help driver to prepare for upcoming driving conditionals, including but not limited to:
- Warnings: safety camera, school zone, hazard spot, restrictions.
- Highway info: Highway exits, rest areas and toll booths.
- Traffic: incidents and flows.
Alert events could be notified with or without an active navigation session.
Step 1: Initialize a DriveSession. Please initialize SDK instance before acquiring it.
DriveSession will require FINE_LOCATION PERMISSION, If you are using customized Location Provider, We will provide API to initialize without default LocationManager.
Step 2: Implement a AlertEventListener interface and add it into the event hub. The Alert Event update can be received in the listener.
Step 3: Enable alert event in drive session.
Enable alert event feature needs extra consumption and it's disabled by default.
Step 4: Disable alert event in drive session.
Users could disable alert event feature to save resource.
Usually, all categories of alert items use same base interface AlertItem to provide basic information including id, type and distance to vehicle.
If the user wants to detail info for a specific alert item, it should down cast alert item to its child class.