SimpleMobileTools / Simple-Clock

Combination of a beautiful clock with widget, alarm, stopwatch & timer, no ads
https://www.simplemobiletools.com
GNU General Public License v3.0
588 stars 237 forks source link

Disable Alarm if Android Auto active? #442

Closed Naomitr0n closed 1 year ago

Naomitr0n commented 1 year ago

Alarms do not have any Android Auto integration and do not have awareness of whether or not Android Auto is active.

Unfortunately, this means that an alarm can go off while you're driving -- sometimes for several hours -- and you have to look at your actual phone to disable it. This is a safety issue obviously, especially on vehicles that plug into the radio to keep your phone out of sight.

What's worse is if you don't catch it right away, and secure your phone with e.g. a PIN or pattern, you have to enter that correctly before being able to disable it. Yuck. Eyes off the road and focused on something too.

Android Auto integration is a lot to ask, but disabling alarms from sounding while in Android Auto mode hopefully isn't. Quick google seemed to suggest an API for this. I'm a desktop developer, not an Android developer, so I'm not sure if the CarConnection API is the right one to use, but if so, here's a few potentially relevant links:

https://developer.android.com/reference/androidx/car/app/connection/CarConnection

https://developer.android.com/training/cars/apps#car-connection

Example usage: https://stackoverflow.com/a/45721893

tibbi commented 1 year ago

I dont think that should be handled on our side