openframeworks/openFrameworks — pull request #1490 by falcon4ever (2012-08-15 13:48:49+00:00)
Title: Fixed an issue related to retrieving the external storage location.

This replaces a part of the previous pull request ( https://github.com/openframeworks/openFrameworks/pull/922 )

Normally you would use the method "Environment.getExternalStorageDirectory()" to find the location to the SD card. However on some phones or tablets, this returns the wrong location (it will probably return /mnt/sdcard), and most likely it will point to the internal storage. On some phones, the SD card is actually mounted on /mnt/sdcard-ext (Motorola) or /mnt/sdcard/external_sd (Samsung). This commit solves the issue by manually checking the possible storage locations (as reported on Stackoverflow) and will return this location if it is writable. If none of the predefined storage locations exist (or aren't writable) it will return the default path by using "Environment.getExternalStorageDirectory()"

More information about this Android related issue can be found here:
- http://stackoverflow.com/questions/5694933/find-an-external-sd-card-location
- http://stackoverflow.com/questions/5524105/how-could-i-get-the-correct-external-storage-on-samsung-and-all-other-devices
- http://beyondpod.com/support/index.php?/Knowledgebase/Article/View/30/0/how-to-change-the-location-of-downloaded-podcasts