Hi,
I faced the same problem of finding external storage devices connected
to the user. My workaround was, I noticed that the LOST.DIR gets created
for all storage devices that are connected to the android device.
So I am searching for the locations for LOST.DIR in the filesystem
starting at root and skipping few locations like not searching in /proc,
/system, /d. I ignore the LOST.DIR in the / directory.
So far this liiks to me like a reliable way to find mount points for
external storage. Since Android 3.2, the permissions however are screwed up.
Srikanth
On Thursday, April 5, 2012 4:20:31 AM UTC-5, Nikolay Elenkov wrote:
> 2012/4/5 Kostya Vasilyev <>:
> > Oh, I see.
> >
> > Rather than coming up with an API to enumerate and access multiple
> storage
> > locations, the entire feature was made explicitly unsupported for
> > third-party applications.
> >
> > Nice.
> >
>
> Nice indeed. To add more unsubstantiated rumours, it appear that there are
> actually environment variables that store the mount point(s) of secondary
> SD cards. Those have been seen in the wild:
>
> EXTERNAL_STORAGE_ALL
> EXTERNAL_STORAGE
> SECOND_VOLUME_STORAGE
> THIRD_VOLUME_STORAGE
>
> System.getenv("EXTERNAL_STORAGE_ALL") returns something like
> this on *some* devices:
>
> /mnt/sdcard:/mnt/usbdisk:/mnt/ext_card
>
> So you'd have to check all and/or parse /proc/mounts, and
> if you have the magic permission, you might be able to use
> the secondary, etc. SD card.
>
> In short, save yourself the trouble and don't bother :)
>
> Using Dropbox, or Google Drive(?), or whatever will
> give you less headaches.
>
>
--
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