Android Question Need to access the same file from different apps

chuck3e

Active Member
Licensed User
Longtime User
I have a Trio-97C. I am unable to access the same file from three different aps. I believe this is because the file exists in internal storage. Even though the directory name is /mnt/sdcard it is really internal storage.

The real sd card appears to have a directory name of /mnt/extsd but my aps are unable to create files on it, possibly because that's the way this tablet was designed? The aps can read the file but not write.

When I execute
Code: Copy
Writer.Initialize(File.OpenOutput("/mnt/extsd/aaa.elsiequiz/files/", MyFile, False))
I get an error of: "java.io.FileNotFoundException: /mnt/extsd/aaa.elsiequiz/files/ELSIECounts062114English: open failed: EACCES (Permission denied)".

I don't get this error when I create this file on /mnt/sdcard.

1. Are all Android tablets unable to create files on actual cd cards?

2. Is there a way to write to the same file in the above mentioned internal storage from different apps?

3. Is there a way to get permission to write to the real CD card?
 
You should not hard code the path, all devices are different, if you need a file to be shared, save it on the root directory, like this:
Code: Copy
Writer.Initialize(File.OpenOutput(File.DirRootExternal, MyFile, False))

Thank you very much, this does work like you said it would, however, it proves there are no simple solutions (for a novice anyway) because now, since my files names are date stamped I have to figure out how to find my files through code since they're mixed in amongst all the other junk in that directory.
 
Upvote 0
Back
Top