prepopulating a database not working in android
I need to prepopulate a database table using
Room.databaseBuilder(appContext, AppDatabase.class, "Sample.db") .createFromAsset("database/myapp.db") .build()
for doing this I have created a myapp.db from DB Browser for SQLite
have kept file inside assets/database folder, but it’s running successfully without any error and no data is available offline. why it’s not giving any error? I tried changing the asset path in function but still, neither any error nor any local database is coming
when I am opening .db file in DB Browser for SQLite, it is opening correctly Please help
I was able to solve the above problem by reinstalling the application, and it also returns a database instance so I was using different instance for the querying database.