I want to prevent user from uninstalling my application.But my main objective is to ask the password before uninstallation of the applcation.Is it Possible in android.
Not without doing something fairly in depth. First of all, I'm completely against this in general. If it's their device, they should be able to remove your app from their device. That said, there are some corner cases where this might be valid. Manufacturers seem to do this a lot (actually, in my opinion this is one of those cases which is not valid but that's a whole other story). They install apps into the system partition, which the user doesn't have rights to modify. You could do the same if you're actually distributing the device. If you want to just do this for a regular Market app, then no.
No, you cannot prevent user from uninstalling your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With