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"/>

Comments

Popular posts from this blog

Clear the app data programmatically in android

convert an integer to a string in java

Print the large string values in android log cat.