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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
No, you cannot prevent user from uninstalling your app.
回答2:
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.