Thursday, March 15, 2012

Re: [android-developers] Re: Galaxy Nexus is not properly implementing getExternalStorageDirectory; can anyone confirm?

On Thu, Mar 15, 2012 at 9:35 AM, Mark Carter <mark@carter.name> wrote:
> Sure, although I'm not going to update my app to call the Media Scanner,
> because it has nothing to do with Media. The problem is, your average user
> will see "Galaxy Nexus" in their Windows Explorer and assume it behaves like
> a regular USB drive.
>
> In fact, I don't understand this at all.  If MTP is supposed to be for media
> only then why is the whole file system exposed?  At least, why expose the
> parts of a file system that are nothing to do with media. Better still,
> shouldn't the media be presented in a more media-friendly way: e.g a flat
> hierarchy with Music, Videos, Photos etc?

Android switched from USB Mass Storage to MTP to get past an even
bigger problem: simultaneous access. USB Mass Storage was the cause
behind the whole "if external storage is mounted, apps can't get at
it" problem that plagued us as developers since the outset. That's
because USB Mass Storage assumes that the "storage" has all the brains
of a thumb drive. MTP assumes that both the storage (e.g., MP3 player)
and the one mounting the storage might want simultaneous access. And
Windows has a built-in MTP client.

Now, I am no USB protocol expert. It is possible that there is some
other protocol that could provide the benefits of MTP without having
the word "media" in it. However, all else being equal, the MTP
approach seems to me to be a net gain for us. And that's coming from a
guy who uses Linux, whose MTP support ranges from "dismal" to
"decrepit".

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment