0

I need to open Notifications Setting for a specific app using adb shell command.

I found below post, which opens the Notification using code. Any way to link to the Android notification settings for my app?

How can I implement this using adb shell?

I tried using below command: "adb shell am start -a android.settings.ACTION_APP_NOTIFICATION_SETTINGS"

But according to documentation, we need to provide Package name of the app as an input. I am not sure how to provide the input using adb shell.

I am working on Android OS >= 9.

Thanks in advance.

  • Which Android version do you use? According to the post you've linked, `ACTION_APP_NOTIFICATION_SETTINGS` is for < 8. – TDG Apr 18 '21 at 09:33
  • I am working on OS >=9 . Is there any adb shell command supported by these OS's? – Sushil Raut Apr 18 '21 at 21:26

1 Answers1

1

I'm eons late, but you'll want to use APP_NOTIFICATION_SETTINGS for OS >= 9.

am start -a android.settings.APP_NOTIFICATION_SETTINGS --es android.provider.extra.APP_PACKAGE app.package.name

If you have any other situations where you need intents over shell but only find code solutions, you can use this page to help "convert" the code to the desired shell command:

https://developer.android.com/studio/command-line/adb#IntentSpec