1

I am trying to find the pathname of external SD card.

The pathname of my external SD card is in /storage/A085-60BC

When i use String SDDirectoryPath = Environment.getExternalStorageDirectory().getAbsolutePath(); , it gives me the path of my internal storage instead.

I have tried various other methods like this and this and enter link description here

but none of them seem to work. all of them just returns me the same internal memory storage path.

Dima Kozhevin
  • 3,602
  • 9
  • 39
  • 52
razorlala
  • 11
  • 1
  • If getExternalFilesDirs() does not give you that path then you are out of luck You could of course list the directories in /storage to see if there is a directory with such an id pattern ####-####. But why do you need the path? You will not be able to write on it. – greenapps Nov 05 '17 at 10:15
  • hi @greenapps, I only need to read the files from the sd card `getExternalStorageDirectory()` returns the directory of my internal storage. I need the external one. – razorlala Nov 05 '17 at 10:33
  • You already told that. I saw it. I can read. But I said: `getExternalFilesDirs()`. – greenapps Nov 05 '17 at 10:33
  • @greenapps sorry. i thought you were writing shortform. `getExternalFileDirs()` is not a method of `Environment`. – razorlala Nov 05 '17 at 10:53
  • Indeed. Very good remark. Why do you want it to be a method of it? Moreover it is NOT getExternalFileDirs()! Please read! – greenapps Nov 05 '17 at 10:56

0 Answers0