I am working on android 2.2, In a Application tab of android manifest provide the option of “Allow clear data” to set true or false. But after setting it to False, my application can’t disable the button of Clear data in application info of Manage application. I am facing this problem when application contains database in Data/Data/packge-name/databases/.
I have to protect my application database from user.
There is no way to prevent the user from clearing your app data. The manifest option you mention is intended for system apps only and you, as a developer, have no way to install system apps.
Please see this discussion for details – particularly this response from Diane Hackborn (Android framework engineer)