I have an application in which I am updating my SQLite db file, but every time when the user uninstalls this application this db file is deleted and at reinstallation a new db file is created. I want to copy this db file after every update to a micro SD card so that after uninstallation I could be able to access my database.
Goal
Copy every time when db file is updated
- say text.db when created
- now I want to copy this db file to micro SD card
- this db file (application db file) is being updated
- now copy and replace this db file to micro sd card
Sudo code to copy the database to SD-Card. To copy it back, simply reverse the streams.