Try in the 2.2 emulator and post the error log please.

On Thursday, May 17, 2012 6:38:46 PM UTC+1, chronogps wrote:
>
> Hi, here is the sample code :
>
> try
> {
> File sdcard = Environment.getExternalStorageDirectory();
> String dbfile = sdcard.getAbsolutePath() + File.separator+ "MyRep" + 
> File.separator + "Mydatabase.db";
> db = SQLiteDatabase.openDatabase(dbfile, 
> null,SQLiteDatabase.CREATE_IF_NECESSARY);
> }
> catch(SQLiteException exc)
> {
> String s=exc.getMessage();
> }
>
>
> I get an I/O error with openDatabase on my Motorola Defy under Android 2.2 
> (no problem with my Acer Iconia under 3.2...)
>
> 1/ The file is created with a size = 0
>
> 2/ I set android.permission.WRITE_EXTERNAL_STORAGE in the manifest
>
> 3/ I do not use SQLiteOpenHelper because it doesn't support path to 
> external storage with api8
>
> 4/ If I copy on the sdcard an existing database  I can read it, cannot 
> write on it
>
> Is it a bug of Android 2.2 ?
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to