Search code examples
androidandroid-sqliteandroid-database

Will sqlite database with user infomations gets deleted or reset after new update of app


I have a question related to database, i know this is not a right platform related to question but i know here i can find great developer.

My query is,

"I am going to develop an app which deal with SQLite Database and a lots of data into the App and user saves a lot data.

so, what if i release new update to play store and user update the app;

will the user get all the data from the SQLite they saved in the previous version of app 'or' the user have to save info again into the database?"


Solution

  • No, it won't get deleted.

    Database will get deleted if it meets following scenarios :

    1. If developer programmatically tries to clean data of the app / User clears data of the app from App info page.

    2. if Developer upgrades Database version after update (It'll call onUpgrade() method in SQLiteOpenHelper & developer has cleared all table content there).