in my app i download a sqlite db on device. The first step of app is download the DB, but on Android 6.0 the app sak permission. If user deny permission the download are not stored on app and i have this error:
android.database.sqlite.SQLiteException: no such table
on this line of my code because there isn't table on db:
public List<String> getAllComuneName() {
List<String> result = new ArrayList<String>();
String[] colums = new String[]{database_comune_schema._NOME};
Cursor cursor = mDb.query(database_comune_schema.TABLE_NAME, colums, null, null, null, null, null);
if (cursor != null) {
while (cursor.moveToNext()) {
result.add(cursor.getString(cursor.getColumnIndex(database_comune_schema._NOME)));
}
cursor.close();
}
return result;
}
how i can ivode that app crash if user deny premission in this case?