Hello, I have my application running on a Motorola droid. We have successfully used it in the intended enviornment for 2 days collecting 340 readings. The app is not full featured but it is running. The data storage is complete and we store, create, delete... small data files on the sdcard. Our design team prefers, in this application, the small files on the external storage sdcard and does not want to use sqlLite.
My beta tester purchased a AT&T Samsung Captivate (Samsung SGH-i897). It seems to have two sdcards. In an earlier thread on this list, they were referred to as an "internal sdcard" and an "external sdcard". Our test unit has both installed. I am having trouble accessing the external storage sdcard. I utilized the code from http://developer.android.com/guide/topics/data/data-storage.html to determine if the sdcard is installed and readable and writeable. The code is: public static boolean cksdcard(){ boolean mExternalStorageAvailable = false; boolean mExternalStorageWriteable = false; String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { // We can read and write the media System.out.println("in cksdcard, MEDIA_MOUNTED"); mExternalStorageAvailable = true; mExternalStorageWriteable = true; } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { // We can only read the media System.out.println("in cksdcard, MEDIA_MOUNTED_READ_ONLY"); mExternalStorageAvailable = true; mExternalStorageWriteable = false; } else { // Something else is wrong. It may be one of many other states, but all we need // to know is we can neither read nor write System.out.println("in cksdcard, Something else is wrong"); mExternalStorageAvailable = false; mExternalStorageWriteable = false; } return mExternalStorageWriteable; } This code returns False which means it is neither readable or writeable. It prints the else - "in cksdcard, Something else is wrong". The app will not run on the Samsung Captivate because it cannot access the data files on the sdcard. Strangely, when I mount the device on the desktop computer, windows explorer shows two (2) connected usb drives which it calls E: and F:. E: is blank. I can copy the files to F:\Android\data\lms\mpT...... with windows explorer. Windows explored does not show /sdcard anywhere, it is probably using an Alias? android.os.Environment.getExternalStorageDirectory() returns "/sdcard" on BOTH the Moto droid and the Samsung Captivate. ''adb shell" works on the Samsung Captivate. "ls -l /sdcard" returns "access denied" or something like that. "ls -l" does show /sdcard in the root directory with the following attributes: "d---------" which means the owner, group, and user (everybody) have no rights at all. Any suggestions how I might get read and write access to the sdcard on the AT&T Samsung Captivate? Thanks, John Brown -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en