No SDcard

splatt

Active Member
Licensed User
Longtime User
If there is no SDCard present on a device, where is the best place to write persistent data? Is File.DirInternal the best place?
 

JesseW

Active Member
Licensed User
Longtime User
If an app is installed to sdcard, does it still have its own private, protected dir DirInternal, and have access to it?

I assume it does, just checking...
 
Upvote 0

JesseW

Active Member
Licensed User
Longtime User
Im wondering if the DirInternal might have to reside on the same mounted drive as the app. Erel???
 
Upvote 0

Hubert Brandel

Active Member
Licensed User
Longtime User
Hi,

I know, that File.DirRootExternal gives me the root of the SD-Card, but my Samsung Galaxy S+ does have 2 of those an internal SD-Card plus my SD-Card.

File.DirInternal => "/data/data/de.test1/files"
File.DirRootExternal => "/mnt/sdcard" => with many subdirs

/mnt/sdcard/external_sd => here is my SD-Card.

Is this normal ?
Is the name "/mnt/sdcard/external_sd" always the same or different, on other Android devices ?

We want to transfer external Data (CSV Files) with the SD-Cards onto the smartphone and import them. Then the missing data will be typed in my program and the Export CSV-Files have to go to the SD-Card back.

If there is no "standardname" for those "external_sd" Cards, I have to
search throught the dirs on the SD Card ... is there an easy solution or just
walk recursive throught te dirs by myself ?

I can do that, but maybe you now a better (faster) way ;-)
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
I know, that File.DirRootExternal gives me the root of the SD-Card
It's actually gives what Google calls "external memory", that is an area of public memory. It was usually an SD-card on early phones but on later phones and tablets it can also be an area of public internal memory. There is no universal way of naming and accessing additional SD-cards when there is already external memory available. They will be hanging off \mnt somewhere but that is all you can assume. You can't necessarily assume that you have write access either. On the "pure" US Google version of Android 3.2 on the Motorola Xoom it is mounted read-only (there is a valid reason for this) but other manufacturer's versions have been tweaked to allow writing. Google really needs to clear up this confusion - hopefully with Android 4.0.
 
Upvote 0

Hubert Brandel

Active Member
Licensed User
Longtime User
Thanks for the info, so I have to put an ID or marker file on the external SD and search the external memory for this marker, good work google ;-)
On the Windows Mobile Side there is a FileSelect(), I did not find this here. :sign0163:
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…