PSK PSK - 8 months ago 74
Android Question

Sqlite Database deleted when I clear data from Application

I have created

database in app. when I clear data from
settings->applications->manage applications
db removed. any suggestions to keep
database as it is.


When you press Clear Data from the Android application manager its supposed to remove everything related to the app such as preferences, databases, caches etc the only thing that gets left is the app so when you re-launch it behaves as if it was just installed.

If you want to allow the user to clear the data but keep the database then there should be an option in the menu that removes the shared preferences but doesn't do anything with the database.

Hope this helps.