3

I would like to know if there is a way to uncheck the "show notifications" check that permits to disable notifications for individual app installed (android 4.1).. or alternatively a way to bring the user in the specific system panel with the "show notifications" option for that app.

Sam
  • 7,252
  • 16
  • 46
  • 65

1 Answers1

3

I would like to know if there is a way to uncheck the "show notifications" check that permits to disable notifications for individual app installed

System apps can do this. Apps running as root can probably hack something in. Otherwise, this is not possible.

or alternatively a way to bring the user in the specific system panel with the "show notifications" option for that app

That's just the Settings screen for the specific app. On many devices, you can show that, as is illustrated in https://stackoverflow.com/a/18873867/115145:

packageName = "your.package.name.here"

try {
    //Open the specific App Info page:
    Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
    intent.setData(Uri.parse("package:" + packageName));
    startActivity(intent);

} catch ( ActivityNotFoundException e ) {
    //e.printStackTrace();

    //Open the generic Apps page:
    Intent intent = new Intent(android.provider.Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS);
    startActivity(intent);

}
Community
  • 1
  • 1
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • on Android 6, the Notification settings are one of the options in the app info screen that Settings.ACTION_APPLICATION_DETAILS_SETTINGS takes you to. Do you know any way of getting all the way to the Notification settings screen? – Mohamed Hafez Sep 03 '15 at 04:43
  • @MohamedHafez: Sorry, I am not aware of an `Intent` to drive straight to that. I don't see any actions matching that on `Settings`, at any rate. – CommonsWare Sep 03 '15 at 11:59
  • Looks like there is a way or anyone looking: http://stackoverflow.com/questions/32366649/any-way-to-link-to-the-android-notification-settings-for-my-app – Mohamed Hafez Sep 03 '15 at 19:05