PSK PSK - 1 year ago 124
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download