Search code examples
androidusagestatsmanager

How request UsageStatsManager permission like a runtime permission?


I want know if exists some solution to request UsageStatsManager permission like a normal runtime permission, where user can allow or deny the access?

enter image description here

i not want redirect user to the list Apps with usage access and still select my app to check this permission like this following code:

 Intent intent = new Intent(); 
 intent.setAction(Settings.ACTION_USAGE_ACCESS_SETTINGS);
 startActivity(intent);

Solution

  • Here is a useful explanation where says that this is a permission conceded only to system apps (then this probably can prevent user interation with the list Apps with usage access like i want).