0

"external storage" can be a removable storage media (such as an SD card) or an internal (non-removable) storage. When there are both internal(non-removable) storage and removable SD card, I can get all the paths of the storage through two files: "scanning /proc/mounts"and "/system/etc/vold.fstab".

However, I don't know which path point to the internal(non-removable) storage. Most devices point "mnt/sdcard" or "storage/sdcard0" to the internal storage according to the vesion of Android Sdk( before Android 4.1 the path is "mnt/sdcard; after Android 4.1 the path is "storage/sdcard0"). But some devices point that path to the removable SD card. Therefore, I don't have some efficent method to divide them. I am waiting for your help. Thank you!

Valery Viktorovsky
  • 6,487
  • 3
  • 39
  • 47
Dai Peter
  • 1
  • 1

1 Answers1

0

No removable memory device will support in android. Those are outside the bounds of the Android SDK at this time. The Android SDK only supports standard external storage, not anything else.

Environment.getExternalStorageDirectory method (it returns the string /mnt/sdcard). The data goes in to the external memory but not the removable SD card.

But if you want external sdcard then check the below links. It may help you to get external mounted devices

Find an external SD card location

Android – Find all sdcards (internal and external)

Community
  • 1
  • 1
Ameer
  • 2,709
  • 1
  • 28
  • 44
  • You are right. Android SDK only supports standard external storage. But I have to develop an application which will allow users to choose which storage path to store data. So I have to get all storage paths even if Android SDK do not have the related API. – Dai Peter Oct 11 '13 at 08:04
  • Ameer, I admire your help so much. By the way, do you know any method to distinguish the inserted sdcard's path and the removable memory device's path? – Dai Peter Oct 12 '13 at 06:39