0

I am struggling with the following issue. In a configuration file I need to access the general path for the external memory card.

This is usually done by reading the %SDCARD% system variable.

However, the makers of my phone created two partitions of the internal memory, and the second partition is mounted as "sdcard". This results in the %SDCARD%" variable returning the path to the second partition of the internal memory, rather than the externally inserted SD Card.

The SD Card is actually mounted "sdcard-ext". Is there a system variable that returns the generic path to this volume to be used in a generic path, such as

folder = "%SDCARD-EXT%/Subfolder1/Subfolder2" 

to access Subfolder2 on the external card?

Thank you in advance for the help!

Jano Rajmond
  • 455
  • 6
  • 10
  • you know that for being able to resolve a problem, the more information one has, the easier and faster it is? What smartphone are you talking about? And you programming with java or are you using low level? C? – David Dec 28 '12 at 19:58
  • Did you see this post http://stackoverflow.com/questions/5694933/find-an-external-sd-card-location – David Dec 28 '12 at 20:04

1 Answers1

0

This is usually done by reading the %SDCARD% system variable.

Android does not use environment variables much, and Linux does not use the % syntax, last I checked.

This results in the %SDCARD%" variable returning the path to the second partition of the internal memory, rather than the externally inserted SD Card.

That is specific to this device from this manufacturer, whatever that device and manufacturer happen to be.

The SD Card is actually mounted "sdcard-ext".

That is specific to this device from this manufacturer, whatever that device and manufacturer happen to be.

Is there a system variable that returns the generic path to this volume to be used in a generic path

That is a question that only the device manufacturer can answer, as Android does not have sdcard-ext, and environment variables, to the extent that there are any, are beyond the Android SDK.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491