I'm developing software based on an open source package that uses external storage to archive data. I wanted to get a Nexus S to help me develop this software, but just noticed that it doesn't have an SD card slot!
I've seen that some other Android phones without SD slots just have a /mnt/sdcard directory as though there were external storage, but others apparently don't offer this feature.
So does the Nexus S emulate external storage? Or will this phone br开发者_开发百科eak my code...?
Thanks very much!
You should not get any problems:
Note: don't be confused by the word "external" here. This directory can better be thought as media/shared storage. It is a filesystem that can hold a relatively large amount of data and that is shared across all applications (does not enforce permissions). Traditionally this is an SD card, but it may also be implemented as built-in storage in a device that is distinct from the protected internal storage and can be mounted as a filesystem on a computer.
From the Environment.getExternalStorageDirectory()
documentation.
So far i never experienced any problem with my apps at my Samsung Galaxy S internal "SD" like storage using the getExternalStorageDirectory(). The phones are identical so I believe you will not have any problems.
Yes, I have a Nexus S and I can confirm that this works.
精彩评论