The problem we have here is that getExternalStorageDirectory does NOT return the location of the sd card. In fact it has nothing to do with sd cards and never has. From the docs:
*"Note: don't be confused by the word "external" here. This directory can better be thought as media/shared storage. It is a filesystem that can hold a relatively large amount of data and that is shared across all applications (does not enforce permissions). Traditionally this is an SD card, but it may also be implemented as built-in storage in a device that is distinct from the protected internal storage and can be mounted as a filesystem on a computer."* http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory() It is that part of the file system that is mounted when you attach an external device such as a desktop computer via the USB port. There is *NO* documented way in Android to enumerate removable storage. On Friday, March 8, 2013 9:21:38 PM UTC, [email protected] wrote: > > Yes, have read the documentation. But that is not what I am looking > for. The getExternalStorage() returns internal sd card (if there are > both internal sd card and external sd card). I want to know how to > find the external sd card path. > > > > On Wed, Mar 6, 2013 at 9:05 PM, TreKing <[email protected] <javascript:>> > wrote: > > > > On Wed, Mar 6, 2013 at 10:29 PM, [email protected] <javascript:> < > [email protected] <javascript:>> > > wrote: > >> > >> So, I want to know, first, how to enumerate all storage locations > > > > > > Did you check the documentation? > > > > http://developer.android.com/guide/topics/data/data-storage.html > > > >> > >> , second, monitor sdcard insert/eject events. > > > > > > See the various MEDIA broadcasts. > > > http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_BAD_REMOVAL > > > > > > ------------------------------------------------------------------------------------------------- > > > > TreKing - Chicago transit tracking app for Android-powered devices > > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to > > [email protected]<javascript:> > > To unsubscribe from this group, send email to > > [email protected] <javascript:> > > For more options, visit this group at > > http://groups.google.com/group/android-developers?hl=en > > --- > > You received this message because you are subscribed to the Google > Groups > > "Android Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

