im using SQLiteOpenHelper to read database from assets . its working on all android versions but android p .
this is my copyDataBase function :
 private static void copyDataBase() throws IOException {
        InputStream myInput = myContext.getAssets().open(DB_NAME);
        String outFileName = DB_PATH + DB_NAME;
        OutputStream myOutput = new FileOutputStream(outFileName);
        byte[] buffer = new byte[1024];
        int length;
        while ((length = myInput.read(buffer))>0){
            myOutput.write(buffer, 0, length);
        }
        myOutput.flush();
        myOutput.close();
        myInput.close();
        SharedPreferences shData = myContext.getSharedPreferences("data", 0);
        SharedPreferences.Editor editor = shData.edit();
        editor.putBoolean("databaseIsOnMemory", true);
        editor.commit();
    }
i puted a log into this function and it did go through it . but im getting this error :
android.database.sqlite.SQLiteException: no such table: irancell (code 1 SQLITE_ERROR)
this is how i get data :
c = myDataBase.query(true, Table_Name, new String[] {IDData,TextData},
    null,null,null,null,null, null);
c.moveToFirst();
int i = 1;
while(!c.isAfterLast()){
    list.add(new KharidBaste(c.getInt(0),c.getString(5)));
    c.moveToNext();
    i++;
}
and the error is on line : "c.moveToFirst();"
 
     
    