-2

I'm working on a security application, it require a feature user can't uninstall app. I use broadcast receiver to recognise user try to uninstall app,but it is not work because first broadcast receiver uninstall then app.

I give device administrator permission,but when user uninstall app then app ask for deactivate device administrator permission then user easily uninstall app.

can anyone suggest me how can i prevent user to uninstall app.

webaddicted
  • 1,071
  • 10
  • 23

1 Answers1

1

The only sort of app which cannot be removed from a non-rooted android phone is a system app. It can be disabled but not removed on non-rooted phones.

If you want to make your app a system app, you need to root your phone to add it to the system apps folder - which ultimately means that it can later be removed by the user of the rooted phone...

Egzy
  • 43
  • 8
  • it is possible to lock only factory reset option – Deepak Sharma Mar 13 '18 at 11:24
  • @DeepakSharma, I just looked into the matter. It seems that Systems Apps cannot be factory reset (so have a factory reset lock) for they belong to the read-only /system partition of the phone as per this article: https://android.stackexchange.com/questions/34498/will-factory-resetting-wipe-clear-away-pre-installed-apps Even on a rooted phone, I can tell from personal experience that you can make the /system partition writeable to put your app amongst the system apps and then make it read-only again once it is already there. – Egzy Mar 13 '18 at 11:43