I am trying to get a list of table names from an SQLite database. I manage to get this, but I also get temporary table names like 'android_metadata' and 'sqlite_sequence'. I want to exclude these 2.
However, I can't get it to work right.
SQLiteDatabase database =
getBaseContext().openOrCreateDatabase("vocabularyDatabase",
MODE_PRIVATE, null);
Cursor c = database.rawQuery( "SELECT name FROM sqlite_master
WHERE (type = 'table') AND (name NOT LIKE 'sqlite_sequence' OR
name NOT LIKE 'android_metadata') ",
null);
if (c.moveToFirst()){
while (!c.isAfterLast() ){
listOfWords.add(c.getString(c.getColumnIndex("name"))
);
c.moveToNext();
}
}