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 android.media package. In this chapter, we are going to explore the media APIs from this package.
At the heart of the android.media package is the android.media.MediaPlayer 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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.