Android 7.0/API24: How to check for notification access (Settings.Secure.enabled_notification_listeners)

后端 未结 1 699
长发绾君心
长发绾君心 2021-01-29 01:27

In Android 6.0/API23 and earlier, the following used to work:

String settingEnabled = android.provider.Settings.Secure.getString(this.getContentResolver(), \"ena         


        
1条回答
  •  攒了一身酷
    2021-01-29 02:23

    Use this:

    Set packageNames = NotificationManagerCompat.getEnabledListenerPackages (context);
    

    0 讨论(0)
提交回复
热议问题