I have created an app which lists the all applications available on my device.
Clicking on a specific app displays the permission associated with it.
I have done this using the package name of the specific app.
The Permissions are sorted with a switch button.
Switch checked shows the particular permission is granted and vice versa.
Upon changing the switch and clicking on Apply changes(Button residing at the bottom of the page)user should be able to change the permission of the application.
For this I have read an accessibility service would be a better option.
I have searched many things available and i have learnt that navigating through a particular application settings ---> permission screen and reading the window content available and using the button action of the accessibility service things can be done.
But the first and foremost thing is navigating to the settings --> Permission is quiet tricky. As per this How to programmatically open the Permission Screen for a specific app on Android Marshmallow?
In stack overflow I have found answer suggesting the navigating through the permission is impossible but I have seen apps which directly takes you to the permission screen. For example : Files go by google
But I am unable to create an accessibility service which can read the settings ---> permissions of a particular app and change the permissions.
To open settings page
Intent intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
Uri uri = Uri.fromParts("package", getPackageName(), null);
intent.setData(uri);
startActivity(intent);
iam trying to develop app similar to this app -
Any help would be appreciated . Thanks in advance Any doubts related to question i will respond immediately.please comment below . please do not mark as closed or unclear what iam asking. Iam ready to explain if the question is not understandable.