O'Reilly logo

Appcelerator Titanium Smartphone App Development Cookbook - Second Edition by Jason Kneen

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

Capturing and playing audio via the audio recorder

Another handy feature of iPhones and most Android handsets is the ability to record audio data—perfect for taking audible notes during meetings or those long, boring lectures! In this recipe, we are going to capture some audio using the Ti.Media.AudioRecorder class, and then allow the user to play back the recorded sound file.

As usual, the complete source code for this recipe can be found in the /Chapter 4/Recipe 6 folder.

Note

Note that this recipe is designed to work on iPhones, so you will also require a physical device. In addition, iPhone 3G models may not be capable of recording in some of the compression formats particularly high-fidelity formats, such as AAC. When in doubt, you should try ...

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