How to prevent an application from being uninstall

2020-01-23 17:03发布

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.

2条回答
▲ chillily
2楼-- · 2020-01-23 17:22

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.

查看更多
趁早两清
3楼-- · 2020-01-23 17:37

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.

查看更多
登录 后发表回答