We are developing an Android application that integrates with a vehicle Head Unit (HU) to launch and cancel Google Maps navigation based on commands received from the HU.
We have implemented the following intent URI to cancel ongoing Google Maps navigation:
val cancelUri = Uri.parse("geo.action:?act=exit_navigation")
Current Behavior:
1. Foreground State: When the RCA application is in the foreground and the phone is unlocked, the cancel navigation functionality works as expected.
2. Background / Locked State: When the RCA application is running in the background or the phone is locked, the cancel navigation request does not stop the ongoing navigation.
3. Navigation Launch:We are able to launch Google Maps navigation while the phone is locked using the `SYSTEM_ALERT_WINDOW` (Display over other apps) permission and an overlay-based approach.
4. Cancel Navigation: Although Google Maps navigation can be launched, the cancel navigation intent is not triggering the expected cancellation when the phone is locked.