jeudi 30 juillet 2015

Android database usage best practice

I have started to work on an android application that requires multiple sqlite databases with same schema. I did some research on how one can add the database for the application and found that there are two ways in which this can be done:

1. Create database

Code for database creation can be added to the activity and once the activity starts the db is created on the specified location.

2. Copy database

The other way could be to add the desired database to the application's assets folder and copy it on the specified location.

I want to know what would be the better approach in my case where I might have require multiple databases with the same schema. Any links or suggestion on the same are highly appreciated.

Aucun commentaire:

Enregistrer un commentaire