android get all external storage path for all devices

后端 未结 3 1529
后悔当初
后悔当初 2021-01-06 19:34

getExternalStorageDirectory() return SD card path on my phone. (Huawei Y320 - android 4.2.2).

now, how to get path Pho

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-06 20:05

    External directory can better be thought as media/shared storage. It is a filesystem that can hold a relatively large amount of data and that is shared across all applications (does not enforce permissions). Traditionally this is an SD card, but it may also be implemented as built-in storage in a device that is distinct from the protected internal storage and can be mounted as a filesystem on a computer.

    if you User data directory...

    Environment.getDataDirectory()
    

    Recommended reading : Android External Storage

    Cheers!

提交回复
热议问题