我想启动待处理意图,以通过我的应用收到的来自NotificationListenerService
的状态栏通知退出正在进行的Google Maps导航。
正如您在调试器的屏幕快照中所看到的那样,不幸的是,notification.actions为空。唯一的非null意图是contentIntent。但是,当我的应用执行contentIntent.send()
时,它将打开正在进行的Google导航。
sbn.getNotification().contentIntent.send();
我猜想notification.allPendingIntents
中两个挂起的意图之一是调用退出导航的正确选择。但是,我找不到从应用程序访问它的方法。
是否可以访问allPendingIntents
?
还是可以通过带有特定参数的contentIntent.send()
触发退出按钮?还有其他想法吗?
Google Maps navigation CustomBigContentView notification Notification properties in debugger