Saturday, June 16, 2012

[android-developers] Where to save data on devices without an sdcard?

I have been searching for answers to this question, but found none.
The Environment method getExternalStoragePublicDirectory() normally
seems to returns "/mnt/sdcard", regardless of whether the sdcard is
mounted or not. It is easy to detect if it is unmounted, but in that
case it is NOT so easy to find out WHERE to save data. If the sdcard
is unmounted, writing to "/mnt/sdcard" normally fails.

For devices which emulate the sdcard (in case it is unmounted), there
often (?) seem to exist a directory "/mnt/emmc", but it is never
returned by any Environment method, and I am not sure that it is so
commonly used that I can rely on it for all devices (with no sdcard).

As this may be a general problem for many of us, I hope that someone
has a solution.

Regards, Terry

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate