PSK PSK - 5 months ago 38
Android Question

Sqlite Database deleted when I clear data from Application

I have created

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

Answer

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.

Comments