Hi, I am already using Environment.getExternalStorageDirectory() and its giving me access to /mnt/sdcard (so thats not where I am mouting the card on my computer, as I am not mounting it). My first application is able to read and write in /mnt/sdcard/file.xml by using Environment.getExternalStorageDirectory().
The second application says : File not found and I use the exact same thing, and the path is good! In this app, Environment.getExternalStorageDirectory() also gives me "/mnt/sdcard" but is indicated as False for isReadable and isWritable methods...why?? I do not get it...I tried everything, even hardcode the path, same problem. Why on earth is the second application unable to access this file? On Jan 14, 4:58 pm, Hari Edo <[email protected]> wrote: > I am guessing that the "/mnt" in your example is where you're mounting > theSDcardimage on your computer. Your Android device doesn't typically > have > a /mnt directory. You may find yourcardis mounted at the root, > e.g., the > path /sdcard/file.xml may exist. The *proper* way to figure this out > is to call > Environment.getExternalStorageDirectory(), which avoids any device-to- > device > differences or assumptions. > > On Jan 11, 12:02 pm, guillaume benats <[email protected]> > wrote: > > > Hi all, > > > I have an application writing xml files on the SDcard, working, I checked by > > mounting thecardas an image. > > > Another application try to access the same file, but says it does not exists > > which is totally wrong (and yes I unmounted the sdcard). > > > File is in /mnt/sdcard/file.xml > > > and application 2 says: /mnt/sdcard/file.xml : File Not Found.... > > > Any idea? It is driving me crazy > > > Benats Guillaume . -- 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

