Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

enable notification access using adb

I have an application that listens to receiving notifications. After installation, I should enable notification access to it from Setting -> Security -> Notification Access

I install this app on an emulator and run it using ADB. But I don't know how to enable notification access setting for it using the command line in ADB.I saw this question and guess its general answer is right but I can not find the actual setting name. Thanks for your consideration.

like image 919
hamed Avatar asked Jan 03 '23 19:01

hamed


1 Answers

Since Android 9 the accepted answer is not working anymore. What worked for me was to use :

adb shell cmd notification allow_listener com.mypackage.app/com.mypackage.app.mylistener
like image 54
113408 Avatar answered Jan 23 '23 04:01

113408