title: SQLiteDatabase Tables not created in Android
body: <p>I've been trying to build a database application with search facility modelled after <code>SearchableDictionary</code> in Android Samples:</p>
  
  <p><strong>The helper class is as following:</strong></p>
  
  <pre><code>public class DataBaseTable {
  
  public static String DATABASE_NAME ="DICTIONARY";
  public static int DATABASE_VERSION=1;
  private final DatabaseOpenHelper datahelper;
  public static String TAG="Databse";
  public static String COL_DEFINITION="DEFINITION";
  public static String COL_WORD="WORD";
  public static String FTS_VIRTUAL_TABLE="FTS";
  
  public DataBaseTable(Context context) {
      datahelper=new DatabaseOpenHelper(context);
  }
  private class DatabaseOpenHelper extends SQLiteOpenHelper{
  
      private SQLiteDatabase mDatabase;
      private Context mHelperContext;
      private String FTS_TABLE_CREATE="CREATE VIRTUAL TABLE " + FTS_VIRTUAL_TABLE +" USING fts3 (" +COL_WORD + ", " +COL_DEFINITION + ");";
  
  
      DatabaseOpenHelper(Context context) {
          super(context, DATABASE_NAME, null, DATABASE_VERSION);
          mHelperContext=context;
      }
  
      @Override
      public void onCreate(SQLiteDatabase db) {
  
  
          db.execSQL("CREATE TABLE DICTIONARY ("+ COL_WORD+ " , "+COL_DEFINITION+");");
          db.execSQL(FTS_TABLE_CREATE);
  
      }
  
  
  
  
      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
          Log.w(TAG, "Upgrading database from version " + oldVersion + " to "
                  + newVersion + ", which will destroy all old data");
          db.execSQL("DROP TABLE IF EXISTS " + FTS_VIRTUAL_TABLE);
          onCreate(db);
  
  
      }
  }
  </code></pre>
  
  <p>And from the <code>MainActivity</code>, I call <code>DatabaseTable db=new DatabaseTable(this);</code> in <code>onCreate(Bundle)</code> method. But I can see no databases in the emulator <code>FileExplorer</code>.</p>
  
  <p>Did I miss something?</p>
  
  <p><strong>EDIT:</strong>
  The MainActivity is as following</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      DataBaseTable db;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          db=new DataBaseTable(this);
          handeIntent(getIntent());
  
      }
  
  
      private void handeIntent(Intent intent) {
          if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
              String query = intent.getStringExtra(SearchManager.QUERY);
              Cursor c = db.getMatch(query, null);
              int[] to = new int[] {R.id.name,R.id.def};
          SimpleCursorAdapter adapter=new SimpleCursorAdapter(this, R.layout.info, c, null, to, 0);
          ListView lv=(ListView) findViewById(R.id.listView1);
          lv.setAdapter(adapter);
  
  
  
      }
  
      }
  
  
      @Override
      protected void onNewIntent(Intent intent) {
          super.onNewIntent(intent);
          handeIntent(intent);
      }    
  }
  </code></pre>