Is there a documented way, in Android 2.x, to inspect multiple sd cards for content?

前端 未结 2 1745
陌清茗
陌清茗 2021-01-13 09:55

Some Android 2.x tablets such as the HTC Flyer and Samsung Galaxy Tab support both internal tablet storage and an external SD card. For example on my Flyer, /sdcard

2条回答
  •  佛祖请我去吃肉
    2021-01-13 10:49

    Normally second sdcard is mounted within the first one.

    Here is what I mean:

    • First sdcard is mounted at /mnt/sdcard.

    • The second sdcard is mounted into /mnt/sdcard/external_sd

    So whenever you receive /mnt/sdcard as path for external storage and start scanning the tree, you won't miss the second sdcard (if it was also mounted).

    This is not documented behavior. But Galaxy Tab behaves exactly this way. I assume this is because there is no official Android API support (i.e. no special function in Environment class) for multiple external storages.

提交回复
热议问题