5

Is it possible to read, Google Maps navigation notification which are shown periodically as the user moves?

For example the distance remaining from next turn is periodically updated. I tried using the NotificationListenerService for this but the notifications generated by Google Maps don't have any of that information when I try using the method getNotifications().getExtras().

Usually notifications published by messaging apps like Whatsapp have everything that one needs in the extras hashmap but Google map doesn't. Is there a possible workaround for this?

Thanks

1
  • you got answer for this?
    – Nithin
    Apr 5, 2018 at 6:48

2 Answers 2

1

From Oreo: statusBarNotification.getNotification().getExtras() returns a Bundle with the navigation information.

Before Oreo: It's more tricky as the information is found inside the RemoteViews included in the notification.

1

I've made a simple free library that you can use to parse Google Maps notifications and get those values.

You can easily get them by implementing a NavigationListener yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.