Prepopulated database - Android application

前端 未结 4 1196
梦谈多话
梦谈多话 2020-12-12 01:07

I\'m having a real trouble in building an android application that has a prepopulated database.

Please take a look at the entire source code.

I created a dat

4条回答
  •  再見小時候
    2020-12-12 01:12

    Well DataHelper comes with a onCreate method you can create the database there a even populates there.

    Official Android documentation

    Called when the database is created for the first time. This is where the creation of tables and the initial population of the tables should happen.

    in fact you haved override that method

     @Override
            public void onCreate(SQLiteDatabase db)
            {
    
            }
    

提交回复
热议问题