In my Android application, I need to add about 300 customers. As application have database import/export
feature available so I decided to do insert customers on computer, instead of mobile.
Here's how I did that:
- Install app on mobile
- Exported
db
using export feature - Inserted data using SQLite Editor tool
- Saved the DB
- Transferred on mobile and imported back
Logically, it should work but it's not working.
Export/Import Feature:
This feature does work as expected, I've tested like this:
- Added some dummy data
- Exported data on SD card
- Delete the App
- Re-install (dummy data wasn't available)
- Imported data back and it worked
What I noticed:
The exported database zip file contains a file with same name as database but with an additional word e.g
DBNAME.db-journal
. When I added data indb
using SQLite Editor, and save it. The-journal
file was removed.As application doesn't show added data in app, but if we export
db
from app and open it in editor, then it shows all data.
I've even tried to remove previous -journal
file, right before importing but no luck.