How to prevent an application from being uninstalled?

Ankur Mistry picture Ankur Mistry · Sep 24, 2011 · Viewed 40.1k times · Source

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.

Answer

Will Tate picture Will Tate · Sep 24, 2011

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.