Creating the Database in SDCARD
public class MyDataBase extends SQLiteOpenHelper {
MyDataBase (final Context context) { super(context, Environment.getExternalStorageDirectory()
+ File.separator + "/DataBase/" + File.separator
+ DATABASE_NAME, null, DATABASE_VERSION);
}
Set the permission for READ and WRITE ACCESS.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
MyDataBase (final Context context) { super(context, Environment.getExternalStorageDirectory()
+ File.separator + "/DataBase/" + File.separator
+ DATABASE_NAME, null, DATABASE_VERSION);
}
Set the permission for READ and WRITE ACCESS.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Comments