title: SQLite, how to get all table names in database?
body: <p>What do you think would be the right way to get all table names' from a database and add them to a list?</p>
  
  <p>Right now got that far:</p>
  
  <pre><code>final ArrayList&lt;String&gt; dirArray = new ArrayList&lt;String&gt;();
  
  SqlHelper sqlHelper = new SqlHelper(this, "TK.db", null, 1);
  SQLiteDatabase DB = sqlHelper.getWritableDatabase();
  Cursor c = DB.rawQuery("SELECT name FROM sqlite_master WHERE type='table'", null);
  
  c.moveToFirst();
  while (c.isAfterLast() == false) {
     dirArray.add("n" + c.getColumnIndex("name"));
     c.moveToNext();
   }
  c.close();
  </code></pre>
  
  <p>But it outputs some "android_metadata" instead of my table name's. So guess there's something wrong with the query.</p>
  
  <p>Thanks!</p>