Click on the Notification programmatically

余生颓废 提交于 2019-11-27 09:22:17

Not all accessibility events will return a source. In fact, most (or at least the events that occur most frequently) do not. Make sure you're limiting to a reasonable subset of events in your configuration AND/OR doing a null check on event.getSource().

If you want to click on the notification, you have to extend the NotificationListenerService, implement what have to be implemented then you can call sbn.getNotification().contentIntent.send(). This way is like if user was clicking on the notification from the notification tray.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!