Chapter    20

Understanding the Media Frameworks

Now we are going to explore a very interesting part of the Android SDK: the media frameworks. We will show you how to play audio and video from a variety of sources. We’ll also cover in the online companion section how to take photos with the camera and record audio and video.

Using the Media APIs

Android supports playing audio and video content under the package. In this chapter, we are going to explore the media APIs from this package.

At the heart of the package is the class. The MediaPlayer class is responsible for playing both audio and video content. The content for this class can come from the following sources:

  • Web: You can play content ...

Get Pro Android 5, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.