Open ACTION_USAGE_ACCESS_SETTINGS screen for specific Android App

Viewed 488

I want ACTION_USAGE_ACCESS_SETTINGS for my app locker Android application without 2 steps navigation. I mean can I get it in background like media permissions or direct access to my app ACTION_USAGE_ACCESS_SETTINGS screen?

snapshot

1 Answers

After digging around in the source code of the Android settings app I think that this is not possible. The screenshot you posted is the UsageAccessDetails Fragment and the only place where it gets created is on line 610 in the ManageApplication class right here, which in turn is in a method that only gets invoked by the onItemClick method of the ManageApplication class right here. So I think that the UsageAccessDetails Fragment only gets created when a user actually clicks on the app in the UsageAccessSettingsActivity of the Settings app.

Related