获取其他应用的通知渠道(或通知设置)

时间:2018-07-29 08:16:16

标签: java android kotlin android-notifications

我有一个NotificationListenerService,我想获取每个通知的NotificationChannel

NotificationListenerService提供getNotificationChannels函数,该函数需要UserHandle才能访问通知。

我需要怎么做才能获得具有正确权限的UserHandle?使用Process.myUserHandle()会引发SecurityException。

我不能使用NotificationManager.getNotificationChannel,因为NotificationChannel不是由我的应用创建的。

或者,有没有其他方法来获取StatusBarNotification的声音和振动设置?

0 个答案:

没有答案
相关问题