Cannot get the NotificationListenerService class to work

前端 未结 9 1843
梦如初夏
梦如初夏 2020-12-03 01:35

I have a android application that is trying to use the new NotificationListenerService class from api 18. I have created my own service class that inherits from this class a

相关标签:
9条回答
  • 2020-12-03 02:29

    After installing a app configured properly, you should grant it.

    You can find the name of the app at "Settings > Security > Notification access", then be sure the check box is filled. :)

    0 讨论(0)
  • 2020-12-03 02:32

    After debugging multiple times to a device, renaming your NotificationListener class helps fix the problem. It doesn't matter what you rename it to, just changing it to something different from the previous name. I've always had to do this over and over again.

    0 讨论(0)
  • 2020-12-03 02:34

    After many hours of researching, I finally found sample code that actually works:

    https://github.com/yihongyuelan/NotificationListenerServiceDemo

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