Now we are going to explore a very interesting part of the Android SDK: the media frameworks. We will show you how to play and record audio and video, from a variety of sources. We'll also cover how to take photos with the camera. Any discussion of media would be incomplete without explaining secure digital (SD) cards and how to work with them, since you'll use SD cards often to read and write media files.
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 ...