How to prevent an application from being uninstalled. How to stop it using code when user want to delete the application ? How can we do that using programming ?
3 Answers
One possible way may be android os customization. Otherwise I think you can't do this. You can see this Stop uninstallation of application
Without customization, you can get a message(using intent) when user try to uninstall a package.

- 1
- 1

- 685
- 3
- 14
Device Administrator 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

- 5,974
- 4
- 30
- 56
You should look at Device Administration .
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.
You can password protect your application to prevent someone from tampering with the Device Admin features in the app.
Please read this example. It is explaining all the details with sample tutorial.

- 284
- 1
- 13
-
sir is there any complete source code for do that with the help of that we stop the un-installation the app.. – liza peter Feb 03 '14 at 07:14
-
@lizapeter have you seen the link I given in the answer ? – user3264399 Feb 03 '14 at 08:27
-
@lizapeter, did you try the answer ? – user3264399 Feb 04 '14 at 07:25