I'm developing an application for parents to watch out for their children. So this application cannot be removed by the child. I need to know how to make it uninstallable or the user need password to remove that application.
Use AppLock If you want to prevent other users from uninstalling your apps, launch AppLock, go to Privacy, and under Advanced, lock the Settings app. In this manner, users will need to use the authentication method you previously set to open the Settings app.
Install Smart App Protector with its helper app (for enhanced reliability). Make sure to make it device administrator. Then, lock Package Installer and Play Store using it (lock down other market apps too). With one tap, the app can lock all apps which could uninstall it.
I've only seen one app that does this, its called Prey and is used to track lost phones and computers. The project is open source so you could go through their code and see how they do it or contact the developer and maybe they'll tell you how they do it.
Ankur,
I think the closest thing to what your looking for is the Device Administration feature introduced in 2.2.
Once the application is registered as a Device Administrator, it can't be uninstalled unless its unregistered. This will prevent the app from being uninstalled.
While the Device Admin API doesn't allow for password protection of this particular feature, you can password protect your application to prevent someone from tampering with the Device Admin features in the app.
I use an app called SeekDroid that has a similar functionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With