NOTE. . Since this question is limited to accessing the "Manage Application Settings" options, my answer covers just that. You will need to figure out a way to get the actual package name.
In addition, if the idea is to also automatically clear the default values ββusing code, this, as far as I know, cannot be done. Someone can fix me if I'm wrong.
At the same time, this code fragment will open a specific application "Application Screen Management" from your application (the name of the package must be indicated).
Intent showSettings = new Intent(); showSettings.setAction(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uriAppSettings = Uri.fromParts("package", "THE_APP_PACKAGE_NAME", null); showSettings.setData(uriAppSettings); startActivity(showSettings);
For example, if the name of the Google Maps application package is com.google.android.apps.maps , replace THE_APP_PACKAGE_NAME with it and the code will open the "Application Management" screen for the Google Maps application.
UPDATE:
PackageManager has a clearPackagePreferredActivities method used to clear the code by default. However, this does not seem to work on newer versions of Android: fooobar.com/questions/1486753 / ...
Other posts worth reading:
source share