I created android application which use DataBase. So I have such a method which fills up the database.
private void Add(String Name,String Descrition)
{
try
{
SQLiteDatabase db = this.getWritableDatabase();
db.execSQL("Insert into Tablename (Name,Description) "
+ "values ('" + Name + "' ,'" + Description "));
}
catch (Exception ex)
{
}
}
When my application is running on the device for the first time, application fill up database by calling this method many times. My application use many a lot of data, so first launch of the application takes a long time. So I have one questions.
Is the possible create database file and next attach to application?? As a result, application would have to be filling up the database for the first time. How do it ??
Aucun commentaire:
Enregistrer un commentaire