Chapter 7

Audio Capture

Developing audio playback applications isn't the only way to work with audio on Android. We can also write applications that involve capturing audio. In this chapter, we'll explore three different methods that can be used for audio capture. Each method has relative strengths and weaknesses. The first method, using an intent, is the easiest but least flexible, followed by a method using the MediaRecorder class, which is a bit harder to use but offers more flexibility. The final method uses the AudioRecord class, and offers the most flexibility but does the least amount of work for us.

Get Pro Android Media: Developing Graphics, Music, Video, and Rich Media Apps for Smartphones and Tablets now with O’Reilly online learning.

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