Thanks!
On Jan 8, 7:24 pm, "Mike Lockwood" <[email protected]> wrote:
> Yes, it uses the mount point, so that would be /sdcard on android.
> However, Java code should use
> android.os.Environment.getExternalStorageDirectory() to avoid hard
> coding the path name.
>
> Mike
>
>
>
>
>
> On Thu, Jan 8, 2009 at 8:54 PM, cturner <[email protected]> wrote:
>
> > Thanks. I see this code.
>
> > #ifdef VFAT_IOCTL_GET_VOLUME_ID
> > int fd = open(pathStr, O_RDONLY);
> > if (fd >= 0) {
> > result = ioctl(fd, VFAT_IOCTL_GET_VOLUME_ID);
> > close(fd);
> > }
> > #endif
>
> > Would I use "/sdcard" as the pathStr?
>
> > On Jan 8, 4:45 pm, "Mike Lockwood" <[email protected]> wrote:
> >> Yes, you can get that from android.os.FileUtils.getFatVolumeId(). The
> >> native code for this is in android_os_FileUtils.cpp
>
> >> But the FileUtils API is not public so this not accessible from apps
> >> built with the SDK. It also requires a kernel change that is not in
> >> the mainline Linux kernel, so if you are porting to another platform
> >> you will need to pull that code into your kernel.
>
> >> Mike
>
> >> On Thu, Jan 8, 2009 at 6:53 PM, cturner <[email protected]> wrote:
>
> >> > How do I read the unique ID of the SD card? Is there a native or Java
> >> > API available to do this?
>
> >> --
> >> Mike Lockwood
> >> Google android team
>
> --
> Mike Lockwood
> Google android team- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"android-framework" 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-framework?hl=en
-~----------~----~----~----~------~----~------~--~---