What is the path to SD card on external storage with multiple partitions (emulated & SD Card)

According to Xamarin 'External Storage' documentation , external storage can have multiple partitions such as the 'emulated storage' and SD card. A device without an SD card still has external storage (an emulated storage).

To get the exact path to the external storage, the Xamarin.Android APIs such as 'Android.OS.Environment.ExternalStorageDirectory.AbsolutePath' is to be used instead of using hard coded path.

At run time, on Samsung A6+ smartphone for example, the path to external storage returned by this API is always '/storage/emulated/0' regardless whether the device (Samsung A6+) has an SD card or not.

When there is only 1 partition of external storage exist (emulated storage), then this '/storage/emulated/0' path makes sense.
But when there are 2 partitions of external storage (emulated and SD card), I still get '/storage/emulated/0' returned by the API.
How do I get the path to the SD card in this case?
In other words, how do I differentiate the path to the 'emulated storage' and the one to the 'SD card' storage?

Thanks in advance for any help or tip.

Sign In or Register to comment.