Kostya, > What state does the code return? Perhaps logging the actual value would > be a good place to start.
Good idea. Unfortunately, I have limited access (time) to that phone since it is in use as a "in case of emergency call 123-4567" type situation and that phone's owner must keep it with him at all times. Also we are beta testing the app in actual usage and so he is having to use my phone for that. So he has both phones and I have, for the next few days, the emulator. But that gives me time to step back and look at what I have done so far. I am new to android. I need to figure out which if I am using any processes that can be classified as "fighting the system". I have had problems with using flat text data files on the sdcard to store, receive, delete, etc information. This information could be kept in a database. The database seems like overkill to me but it might be that data files on the sdcard are going to be headaches if I want to use several different devices. Maybe the database would work smoothly from device to device. I think I will write a general description of my app, post it on this helpful list, and ask for advice as to which architectures to use and which to avoid. Thank you Kostya. John Brown On Aug 19, 12:35 am, Kostya Vasilyev <[email protected]> wrote: > John, > > What state does the code return? Perhaps logging the actual value would > be a good place to start. > > System.out.println("in cksdcard, Something else is wrong, state = " + state); > > The output from "ls -l" does seem weird. On my Galaxy S (not quite the > same thing, but close), I get this: > > drwxrwxr-x system sdcard_rw 2010-08-19 09:51 sdcard > > -- Kostya > > 19.08.2010 0:52, john brown пишет: > > > > > > > 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 aAT&TSamsungCaptivate (SamsungSGH-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.htmlto > > 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 theSamsungCaptivate 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 theSamsungCaptivate. > > > ''adb shell" works on theSamsungCaptivate. "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 > > theAT&TSamsungCaptivate? > > > Thanks, John Brown > > -- > Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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

