how to save .db or .sqlite in assets folder . At this time i am doing that:
@Override
public void onCreate(SQLiteDatabase db) {
mDatabase = db;
SQLiteDatabase.openOrCreateDatabase("assets/"+DATABASE_NAME+".db", null);
mDatabase.execSQL(FTS_TABLE_CREATE);
}
but the openOrCreateDatabase giving error. I try with both .db and .sqlite but error is same.
You can’t open the database from assets — you’ll need to copy it to local storage first.