O'Reilly logo

Pro Android 4 by Satya Komatineni, Dave MacLean

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

Recording Media

As we've shown, there are many ways to play media from within Android. For recording, there are fewer options. The main workhorse of recording is the MediaRecorder class, which is used for both audio and video. In this section, we'll show you how to use MediaRecorder for both types of media. The other class for recording audio is AudioRecord, and we'll demonstrate this with another sample application. Sometimes you don't want to write code to accomplish something when an existing application can do it for you. So we'll also show you how to fire off an intent to record audio, as well as to capture still camera images using the Camera application.

Exploring Audio Recording with MediaRecorder

The Android media framework supports ...

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