On Aug 20, 6:27 am, Dianne Hackborn <[email protected]> wrote:
> It's possible there will be a standard API for this in the future... but to
> be honest, it is hard for me to imagine dealing with multiple external
> storage locations as resulting in a decent user experience, so it may not
> happen. Just causing the user have to be aware that they have some pictures
> in their internal storage and some in the external SD card, and how much
> space they have on each, and what to do if one is full... yuck.
>
I just get a Samsung Galaxy S an I also have problem with multiple
storage path that are not see with Android API. I don't understand why
it should be complicated to manage several mount point. Even on a
normal Android phone there is one tool that provide everything that is
need for developer : the "mount" command.
Without any privilege I get very valuable information that is not
accessible from Android API.
$ mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
/dev/block/stl6 /mnt/.lfs j4fs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/stl9 /system rfs rw,vfat,llw,check=no,gid/uid/
rwx,iocharset=utf8 0 0
/dev/block/mmcblk0p2 /data rfs rw,nosuid,nodev,vfat,llw,check=no,gid/
uid/rwx,iocharset=utf8 0 0
/dev/block/stl10 /dbdata rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/
rwx,iocharset=utf8 0 0
/dev/block/stl11 /cache rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/
rwx,iocharset=utf8 0 0
/dev/block/stl3 /efs rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/
rwx,iocharset=utf8 0 0
/dev/block//vold/179:1 /sdcard vfat
rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0102,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-
ro 0 0
/dev/block//vold/179:9 /sdcard/sd vfat
rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-
ro 0 0
An API providing the list of mount point, volume type and read/write
properties is welcome.
I have a BroadcastReceiver to monitor SDcard mount/umount :
mVolumeManagerReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Log.i("VolumeManager", "Storage: " + intent.getData());
updateVolumeState(intent);
}
};
IntentFilter filter = new IntentFilter(Intent.ACTION_MEDIA_MOUNTED);
filter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
filter.addAction(Intent.ACTION_MEDIA_REMOVED);
filter.addDataScheme("file");
mApplication.registerReceiver(mVolumeManagerReceiver, filter);
When I umount the external SDcard from Galaxy S I can see the correct
path "file:///sdcard/sd" inside intent.getData().
I can monitor change from any mount point but I am unable to create
initial list of mounted volume. I think we need an API that match
"mount" command to create reliable application.
Jean-François
--
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