Search code examples
androidnotificationssmssettingsapplication-settings

Go to Default SMS Application settings through my Application


Is it possible to go to the default SMS Application settings page through my application? For example I have a button in my app, when it is clicked it must redirect user to default sms application settings so that user can close the notifications which is required in my application.

I have tried this code:

 Intent a = new Intent(android.provider.Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS);
            a.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(a);

Now this will redirect me to All applications page but i want to redirect user to default sms application directly Is it possible to do so?


Solution

  • I didn't try that. I hope it will work. This is just the way to go to setting page of application. For that you must know the package name.

    Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
    intent.setData(Uri.parse("package:" + getPackageName()));
    startActivity(intent);