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 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.