是否可以阅读在用户移动时定期显示的 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/