Michael En
Michael En

Reputation: 11

Environment.getExternalStorageDerictory() return path to internal memory

Help me, please. My problem: I have path /storage/sdcard0. It's internal memory on my device. /storage/sdcard1 - path to SD. Functoin

Environment.getExternalStorageDerictory()

return path /storage/sdcard0. How can I get path to my SD?

Upvotes: 0

Views: 76

Answers (1)

Nyxar
Nyxar

Reputation: 54

As pointed by Android doc :

Environment.getExternalStorageDirectory();

will return the primary external storage.

If you want to get the removable sd card path, you can read the /proc/mounts file to get the mounted medias since the path may vary from each device.

You can read this to get an idea : How to use your external removable SD Card

Upvotes: 1

Related Questions