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.
I found the answer here just type :
adb shell settings put secure enabled_notification_listeners %nlisteners:com.example.myapplication/com.example.myapplication.service.ServiceNotificationIntercept
No spaces after listeners
.....