It is possible to pre-populate an Android Room database, as per this:
Room.databaseBuilder(appContext, AppDatabase.class, "Sample.db")
.createFromAsset("database/myapp.db")
.build();
However, all code on the internet uses a .db
file from the assets
folder.
I use MySQL on my system. Is it somehow possible to export a database from MySQL in .db
format and directly load from that in Android Room? It seems that exporting the schema from MySQL Workbench creates something that is not the same as a .db
file.