KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm looking to create a sqlite database on the sd card (don't want to use up the user's internal storage). I'm familiar with the OpenHelper pattern: public DatabaseFoo(Context context) { OpenHelper openHelper = new OpenHelper(context); mDb = openHelper.getWritableDatabase(); } private static class OpenHelper extends SQLiteOpenHelper { public OpenHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } ... so if we want to create on the sd card, I think instead we have to use: public static SQLiteDatabase openOrCreateDatabase (String path, SQLiteDatabase.CursorFactory factory); But what is the "factory" argument supposed to be, what factory should be used? Also a bit worried about what happens if the user removes the SD card while my app is in use.. Thanks
Tags (comma-separated)
Save Edits
Cancel