Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent an application from being uninstalled?

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.

like image 574
Ankur Mistry Avatar asked Sep 24 '11 15:09

Ankur Mistry


People also ask

How do I prevent an app from being uninstalled?

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.

How do I lock uninstall on android?

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.


2 Answers

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.

like image 25
slayton Avatar answered Sep 22 '22 10:09

slayton


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.

like image 65
Will Tate Avatar answered Sep 24 '22 10:09

Will Tate