I was thinking of a security app which will have device administrator privileges. I wanted to see if it was 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. The idea is for parents to install a security app on their kids' phones and not have the kids uninstall it easily. Would something like this be possible without root access?
Asked
Active
Viewed 3,263 times
1 Answers
1
Start the pass-code activity in onDisableRequested() method (an override method of DeviceAdminReceiver)
In Android 2.3 As soon as deactivate button is clicked your activity will open.
From Android 4.x The activity opens after around 5-10 secs when deactivate button is clicked. So you can lock the device from onDisabled() method instead onDisableRequested().

Kishore
- 952
- 2
- 11
- 31
-
1Applications AppLock, Android Pareantal Control have implemented it, How these apps are doing if it is not possible? – Ahmad Raza Dec 11 '13 at 11:34
-
1Does anyone here said its not possible? – Kishore Dec 23 '13 at 04:52
-
When you start new activity, it will take almost 3 to 5 seconds and user can disable the adminPolicy easily during this duration. – Ahmad Raza Dec 23 '13 at 13:28