differences between /sdcard/emulated/0 and /sdcard

后端 未结 2 963
自闭症患者
自闭症患者 2021-02-19 10:22

I\'m goig to be mad with a strange issue. If i create a folder inside my code as

directory_path = Environment.getExternalStorageDirectory()
                + \"/         


        
相关标签:
2条回答
  • 2021-02-19 11:04

    Have you tried reading back the data? /storage/emulated/0/ is the new path introduced in JB to support multiple users on tablet. But as long as you access external files using Environment.getExternalStorageDirectory() it doesn't really matter where they really reside.

    Here's some additional info: https://android.stackexchange.com/questions/35541/why-did-sdcard-turn-into-sdcard-0-with-4-2

    0 讨论(0)
  • 2021-02-19 11:04

    /storage/emulated/0/: to my knowledge, this refers to the "emulated MMC" ("owner part"). Usually this is the internal one. The "0" stands for the user here, "0" is the first user aka device-owner. If you create additional users, this number will increment for each.

    /storage/emulated/legacy/ as before, but pointing to the part of the currently working user (for the owner, this would be a symlink to

    /storage/emulated/0/). So this path should bring every user to his "part".

    /sdcard/: According to a comment by Shywim, this is a symlink to...

    /mnt/sdcard (Android < 4.0)

    /storage/sdcard0 (Android 4.0+)

    For more detail you can visit stackexchange

    0 讨论(0)
提交回复
热议问题