0

I am writing an app that has some notifications. I want the notifications to be postponed if the phone is in Android Auto driving mode, because the driver wouldn't be able to take any actions anyways. And further more, if it's in the middle of a navigation, I want to postpone until the ETA of the current route.

In my imagination, it is implemented like this:

void onAlarm() {
  if (AndroidAutoAPI.isInDrivingMode())
    snoozeUntil(AndroidAutoAPI.getCurrentETA());
  else
    getSystemService(NotificationManager.class).notify(...);
}

But I couldn't find any documentation on any APIs as such. Are they available at all?

Sah
  • 1,017
  • 2
  • 11
  • 19
  • The problems is: If you have Google Maps navigation opened on your phone, you will still receive all apps notifications and this is not so different as using navigation in Android Auto. Actually blocking the notifications on the phone is a user choice and probably you can't do anything currently. If you play a game fullscreen, notifications won't stop automatically... – MatPag Jun 30 '17 at 11:12
  • I think you have a point. I was actually about to file a feature request for this API, when I realized maybe I had the wrong design of it at all. – Sah Jul 02 '17 at 11:54

0 Answers0