android - 通过 NotificationListenerService 读取谷歌地图通知

标签 android google-maps notification-listener

是否可以阅读在用户移动时定期显示的 Google map 导航通知?

例如,距离下一回合的剩余距离会定期更新。为此,我尝试使用 NotificationListenerService,但当我尝试使用 getNotifications().getExtras() 方法时,Google map 生成的通知没有任何此类信息。

通常,Whatsapp 等消息应用程序发布的通知在 extras hashmap 中包含人们需要的一切,但 Google map 没有。是否有可能的解决方法?

谢谢

最佳答案

来自奥利奥: statusBarNotification.getNotification().getExtras() 返回带有导航信息的 Bundle。

奥利奥之前: 它更棘手,因为信息是在通知中包含的 RemoteViews 中找到的。

关于android - 通过 NotificationListenerService 读取谷歌地图通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42328657/

相关文章:

java - 如何在数组中存储多个数据类型?

javascript - 试图让简单的谷歌地图示例与 AngularJS 一起工作

android - 应用程序崩溃后通知监听器服务不工作

notifications - 来自 MBean 的 JMX 通知未监听/订阅。通知会发生什么情况?

android - 如何在android中关闭通知的振动

android - com.android.build.api.transform.TransformException : java. util.zip.ZipException

android - 如何将 Ontouch 和 Onclick 用于 ImageButton?

android - 无法展开 Firebase 通知

Android 性能 XML Drawable vs CSS3 vs Images

Android Studio Google Map V2 fragment 渲染