3

In all the devices I have had the sd card has always been mounted on the path /mnt/sdcard (this value is also returned by the function Environment.getExternalStorageDirectory().getAbsolutePath())

Can I consider it as a constant or are there cases in which it is different?

AJNeufeld
  • 8,526
  • 1
  • 25
  • 44
Massimo
  • 3,436
  • 4
  • 40
  • 68

3 Answers3

6

No. You can't consider as Constant its change sometime /sdcard only.So use Environment.getExternalStorageDirectory().getAbsolutePath() for path.

Samir Mangroliya
  • 39,918
  • 16
  • 117
  • 134
1

On samsung galaxy s2 /sdcard is phone external memory. micro sd is under /sdcard/external_sd

Guntis
  • 496
  • 1
  • 5
  • 19
  • But, without a rooted phone, can you write in both memories? Or you have access just to one of them? – Massimo Oct 17 '12 at 12:55
  • access via file manager is to both memories. And without rooted phone. see [this answer](http://stackoverflow.com/questions/5694933/find-an-external-sd-card-location) – Guntis Oct 17 '12 at 12:59
  • Ok. I asked it because developers guide says "In devices with multiple external storage directories (such as both secure app storage and mountable shared storage), this directory represents the "primary" external storage that the user will interact with." Than another related question: is there a function for obtaining the path of an additional memory (if present)? – Massimo Oct 17 '12 at 13:01
  • 1
    Read here http://developer.android.com/guide/topics/data/data-storage.html#filesExternal – Guntis Oct 17 '12 at 16:25
1

No , the external storage can be a removable storage media (such as an SD card) or an internal (non-removable) storage.

Soheil Setayeshi
  • 2,343
  • 2
  • 31
  • 43