Hi I need advice on how to create the sqlite db for my app. You see, I have an app that connects to a server db in php/mysql platform. I need my android app to have an sqlite db that is a minimal version of the server db particularly only data that are relevant to the type of user using the app.
Some things I've considered:
- Attach a pre-populated sqlite db to the APK. This one would certainly make the APK package big.
- Create the sqlite db upon first time use of the app, connect to the server and extract necessary data to populate the sqlite db. I'm not sure how to do this as I usually use json to exctract data from server. This might also take so much time as each record will be inserted to the sqlite tables.
- I was thinking of requesting the server to create a pre-populated sqlite db based on the latest set of data it has. Then the app would then download this generated sqlite db and transfer it to my android app.
Any thoughts on this would be much appreciated. If you have other suggestions, please let me know.