O'Reilly logo

Pro Android Media: Developing Graphics, Music, Video, and Rich Media Apps for Smartphones and Tablets by Shawn Van Every

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HTTP File Uploads

One way that we may wish to allow the user to distribute media that is created by applications we develop is to allow them to be posted to online video sharing sites, such as YouTube, Vimeo, or Blip.TV.

In order to post files to services such as these, we need to do an HTTP file upload. There are several ways we might accomplish an HTTP file upload on Android. The way that gives us the most flexibility is to involve importing and using libraries from Apache's HTTP Components (http://hc.apache.org/) that were not fully included with Android.

We'll need httpmime-4.0.x.jar, which is provided within the HttpClient 4.0.x (GA) download available at http://hc.apache.org/downloads.cgi. (The “x” in the version numbers is currently at ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required