Skip to content Skip to sidebar Skip to footer

Programmatically Enable Android Device Administration

I want to write tests for an application that uses the android device administration API . My problem is that the user needs to manually grant one-time approval for the applicatio

Solution 1:

I did not find a way to grant admin automatically.

Luckily, however, the AVD remembers that the application was granted admin and does not revoke it after installing a later version of the same app. Thus, after a manual one-time process of enabling admin on the emulator I can run all my tests that require admin, as long as i don't switch to another AVD.

Post a Comment for "Programmatically Enable Android Device Administration"