Android应用程序如何检测设备中的左右SD卡

发布于 2024-12-21 03:14:18 字数 143 浏览 3 评论 0原文

如果我有两个物理SD卡“左用户SD卡”和“右用户SD卡”(如vold.fstab中给出),那么像filemanger这样的应用程序如何知道有两个SD卡 - “左用户SD卡”和“左用户SD卡” “正确的用户SD卡”。

任何人都可以帮助我

谢谢

if I have two physical sd cards "left user sdcard" and "right user sdcard"(as given in vold.fstab), then how will applications like filemanger, know that that there are two sdcards - "left user sdcard" & "right user sdcard".

can any one help me

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

过气美图社 2024-12-28 03:14:18

我认为没有官方Android API支持(即环境类别)用于多个外部存储。

通常第二张 SD 卡安装在第一张 SD 卡内。 (根据我在 Samsung Galaxy Tab 中注意到的情况)

类似:

  • 第一个 sdcard 安装在 /mnt/sdcard

  • 第二个 sdcard 被安装到 /mnt/sdcard/external_sd

所以,每当你得到外部存储路径如 /mant/sdcard/ 您必须扫描到整个树结构..

I think there is no official Android API support (i.e. no special function in Environment class) for multiple external storages.

Normally second sdcard is mounted within the first one. (As per I noticed in Samsung Galaxy Tab)

Something like:

  • First sdcard is mounted at /mnt/sdcard.

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

So, Whenever you get external storage path like /mant/sdcard/ You have to scan to whole tree structure..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文