How do I change the android database storage path? The default path for database storage is / data / data / databases,I want to save it to sdcard, how to do?
A:
You can put and open the database from wherever you like, i.e.
SQLiteDatabase.openDatabase("/sdcard/mydatabase.db", null, SQLiteDatabase.OPEN_READONLY);
Mathias Lin
2010-10-12 04:14:03
A:
SQLite's openDatabase()
lets you provide a location for your database.
You should use Context.getExternalFilesDir() to find the SD card's path instead of hardcoding it, though. That link has some nice code samples which you should make use of.
Josh
2010-10-12 15:26:03
hi Josh,thank you
fonter
2010-10-16 02:05:23