I have tried this code
Cursor c=db.rawQuery("SELECT name FROM sqlite_master WHERE type = \'table\'",null); c.moveToFirst(); while(!c.isAfterLast()){
Try this:
SELECT name FROM sqlite_master WHERE type = "table";