O'Reilly logo

Android Application Development: A Beginner’s Tutorial by Budi Kurniawan

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

Chapter 21

The Sound Recorder

The Android platform ships with a multitude of APIs, including one for recording audio and video. In this chapter you learn how to use the MediaRecorder class to sample sound levels. This is the same class you used for making videos in Chapter 20, “Making Videos.”

The MediaRecorder Class

Support for multimedia is rock solid in Android. There are classes that you can use to play audio and video as well as record them. In the SoundMeter project discussed in this chapter, you will use the MediaRecorder class to sample sound or noise levels.MediaRecorder is used to record audio and video. The output can be written to a file and the input source can be easily selected. It is relatively easy to use too. You start by instantiating ...

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