jeudi 1 octobre 2015

Generating pre-filled SQL database for Android app using Android Studio

I have an android app that fetches JSON data from a server and then populates the parsed data into an SQLite database using GreenDAO.

When I ship my app, I want to pre-fill the initial database.

Is there a way that I can create a new runnable module in Android Studio, where I can generate a DB file that I can ship with my app? (My current technique is to run the app once with certain flags set, and then to backup my app and extra the DB from the backup -- this is cumbersome and fragile).

Aucun commentaire:

Enregistrer un commentaire