What is the path of the removable card (SD card) in Android? Xamarin

0

I need help to find the path (path) of the removable card (removable Sd card) of an android device, here the code:

         var list = System.IO.File.ReadLines("/proc/self/mountinfo");
        foreach (var i in list)
        {                    
                Console.WriteLine(i);
        }
 //Output:
/runtime/write /storage rw,relatime master:10 - tmpfs tmpfs 
rw,seclabel,mode=755,gid=1000

 / /storage/emulated rw,nosuid,nodev,noexec,relatime master:26 - sdcardfs 
 /data/media rw,seclabel,low_uid=1023,low_gid=1023,gid=9997,
 multi_user,mask=0007,reserved=20MB

 / /storage/590B-3A12 rw,nosuid,nodev,noexec,relatime master:32 - sdcardfs 
 /mnt/media_rw/590B-3A12 rw,seclabel,low_uid=1023
 ,low_gid=1023,gid=9997,mask=0022

  /user/0 /storage/self rw,relatime master:10 - tmpfs tmpfs 
  rw,seclabel,mode=755,gid=1000

    //No puedo encontrarla con este codigo
   var path = Android.OS.Environment.ExternalStorageDirectory.Path;
       //output: "/storage/emulated/0" que es la interna

Thank you.

    
asked by C. Sosa 13.07.2017 в 17:27
source

1 answer

1

Well, I found the answer, in Android 6+ the path of the removable card has been changed to something like this "/ storage / hex-code"

 /storage/590B-3A12 rw,nosuid,nodev,noexec,relatime master:32 - sdcardfs 
 /mnt/media_rw/590B-3A12 rw,seclabel,low_uid=1023
,low_gid=1023,gid=9997,mask=0022

Being "/ storage / 590B-3A12" the path of the removable card, on my Android device a Samsung J7 Prime, Android 6.0.1.

    
answered by 13.07.2017 в 20:18