knowing the location of the database in the SDCard of Android emulator
If i am creating any database in android, where does it gets stored in the SDCard of the emulato开发者_如何学JAVAr? and also is the database path of the SDCard and the DB path of the device memory different??
Databases are by default stored in internal memory. On a real device like the Droid X, it will be stored somewhere /data/data/package.name.here/databases/dbname.extension
Also, look up Context.getDatabasePath(..)
You can specify an explicit path to the SD card in your openOrCreateDatabase() call. e.g.
SQLiteDatabase db = openOrCreateDatabase("/sdcard/myapp/mydb", MODE_PRIVATE, null);
Just make sure to test that /sdcard exists before you start writing to or reading from it.
精彩评论