class SQLiteUtils {

    @NonNull
    public static ArrayList<String> getAllTableNames(SQLiteDatabase database) {
        Cursor cursor = database.rawQuery("SELECT name FROM sqlite_master  WHERE type='table' ORDER BY name;", new String[]{});
        int nameColumnIndex = cursor.getColumnIndex("name");

        ArrayList<String> tableNames = new ArrayList<>();
        while (cursor.moveToNext()) {
            String tableName = cursor.getString(nameColumnIndex);
            if (!isInternalTable(tableName)) {
                tableNames.add(cursor.getString(nameColumnIndex));
            }

        }

        return tableNames;
    }

}