Hi,

I use Environment.getExternalStorageDirectory() already.
The first application is writing/reading (without problem) on the
SDCard via:

File f = Environment.getExternalStorageDirectory()
and File f2 = new File(f,"file.xml");

The second application is also using
Environment.getExternalStorageDirectory() but
adb logcat says when getting to open "file.xml": "File Not Found". And
I use the exact same thing that the other application.
I am sure the sdcard is mounted (emulator -sdcard sdcard) as I can use
it for first app, and thus sdcard scan is also completed.

So I tried to display some information and here is the problem I
guess:
f.isReadable() = FALSE
f.isWritable() = FALSE
which is tested in the second app.

I do not get why?

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
> the
> SD card image on your computer.  Your Android device doesn't typically
> have
> a /mnt directory.  You may find your card is 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 the card as 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

Reply via email to