2013-01-10 16 views

回答

2

不,這完全取決於製造商。像Nexus S,Galaxy Nexus和Nexus 4這樣的設備具有不可拆卸的外部存儲設備,而像Optimus One這樣的設備只有可拆卸的外部存儲設備。一些設備甚至可能有兩個外部存儲器,一個是板上存儲器芯片的一個分區,另一個是SD卡。

編輯

由於CommonsWare在評論中指出,只要標準的Android SDK的問題,你只需要在設備(您可以通過Environment.getExternalStorageDirectory()得到)在一個外部存儲。如文檔狀態,這將返回主外部存儲在一個以上的外部存儲器中的存在的情況下:至少爲Android 4.2,

In devices with multiple "external" storage directories (such as both secure app storage and mountable shared storage), this directory represents the "primary" external storage that the user will interact with.

+4

從技術上講,一個設備將具有恰好一個外部存儲位置,從Android SDK的角度以及短語「外部存儲」的定義。設備製造商可能會選擇支持製造商可以存儲數據的附加地點(例如,除板載外部存儲器之外的SD卡插槽),但這取決於設備製造商,目前不受Android的支持SDK。 – CommonsWare

+0

@CommonsWare你是對的,像往常一樣:P我會編輯我的答案,以反映這一點。 –

+0

感謝您的回答拉格哈夫。 – Anish

1

從該鏈接

Because the external storage may be unavailable—such as when the user has mounted the storage to a PC or has removed the SD card that provides the external storage—you should always verify that the volume is available before accessing it.

相關問題