Search code examples
androidandroid-intentandroid-pendingintentandroid-settings

How to Open "App Notifications" Screen in settings By Intent (Screen Shot Attached)


enter image description here

I have tried many intents from class android.provider.settings but not able to open this Screen Directly.


Solution

  • You can get the activity's package name and class name from the manifest.xml of Settings,so you can do it like this :

    Intent intent = new Intent();
    ComponentName componentName = new ComponentName("com.android.settings","com.android.settings.Settings$NotificationAppListActivity");
    intent.setComponent(componentName);
    startActivity(intent);
    

    And I tested it on Anroid 8.1.0 nexus 6p.