Search code examples
android

Device Administrator password


Is it possible to require a pass-code when the user tries to uncheck the app as an administrator under Settings->Security->Device Administrators?

This would add a roadblock to not easily allow the user to uninstall the app as they would first need to remove the admin privileges from the app (for which they would need to authenticate with a password) and then they could uninstall.


Solution

  • This is not possible AFIK. This is right of user.

    You can show a dialog for confirmation about DE-activation of Device Admin, but neither default device admin API gives you a way to show password dialog while DE-activating device admin, nor EDM APIs gives you the permission.

    Although EDM APIs gives a way where you can block the DE-activation of Device administrator. So user can not uncheck a particular Device admin.