How to prevent an application from being uninstalled ?

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 ?

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.


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


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.


Need Your Help

regex to parse csv

asp.net regex csv

I'm looking for a regex that will parse a line at a time from a csv file. basically, what string.readline() does, but it will allow line breaks if they are within double quotes.

Google Maps API disable street view UI

javascript google-maps google-maps-api-3

I'm using the Google Maps JavaScript API v3. Is it possible to disable/hide all street view UI in google maps?