Skip to content Skip to sidebar Skip to footer

Why SQLite Database Cleared On Clearing Data Of Application From Application Management?

I created a simple database application using SQLite which first creates database and then allow users to insert and view inserted records. But when I clear data from Application S

Solution 1:

When you create a database, Android create a new database file in the /databases folder. When you delete data, Android cancel every files created in the application folder, included the /database folder. You should use a persistent DataBase like the Content Provider


Solution 2:

You can use Content Provider so that it will retain Data at all time , also it will allow you to share your Data between Different Application :

Check this Content Providers.

Also check this Sample for using Content Provider.


Post a Comment for "Why SQLite Database Cleared On Clearing Data Of Application From Application Management?"