Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this section you will learn how to record audio and video. We will discuss using intents to record video and see how to use the media recorder.
The easiest way to capture audio and video is to use intents to launch the video recorder. This method allows you to control the storage location along with the video recording quality, while still letting the native application handle all other controls for the video.
When you need more fine-grained control, the MediaRecorder object lets you control all aspects of the recording process.
Before any media can be recorded in Android, the following uses-permissions must be added to the program manifest:
<uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.RECORD_VIDEO"/>