[android-developers] Re: SQLite database on sdcard under android 2.2 : possible ?

2012-05-17 Thread RichardC
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 +

[android-developers] Re: SQLite database on sdcard under android 2.2 : possible ?

2012-05-17 Thread chronogps
I made a mistake : the problem is under Android 2.1 The log cat under 2.1 Emulator is : 05-17 19:43:06.536: E/Database(245): sqlite3_open_v2(/mnt/sdcard/chronogps.db, handle, 6, NULL) failed 05-17 19:43:06.536: W/dalvikvm(245): threadid=15: thread exiting with uncaught exception

[android-developers] Re: SQLite database on sdcard under android 2.2 : possible ?

2012-05-17 Thread RichardC
The following code just worked for me on the emulator (android 2.1): File f1 = Environment.getExternalStorageDirectory(); Log.v(TAG, f1.getAbsolutePath()); String dbFilePath = f1.getAbsolutePath() + File.separator + extdir.db;

[android-developers] Re: SQLite database on sdcard under android 2.2 : possible ?

2012-05-17 Thread chronogps
You are right. I found my problem (which is not in the sample source code I posted first (that's doesn't help !!!) File f1 = Environment.getExternalStorageDirectory(); Log.v(TAG, f1.getAbsolutePath()); returns \sdcard under 2.1 and \mnt\sdcard unders 2.2 And I hardcoded