Recording Video Using an Intent

It is becoming cliché, but as previously discussed, often the quickest and easiest way to perform some function on Android is to leverage an existing application that can be triggered by an intent from our application. Using the built-in Camera application to record video, triggered by an intent, is no exception.

Within the android.provider.MediaStore class is a constant named ACTION_VIDEO_CAPTURE, which contains the string “android.media.action. VIDEO_CAPTURE”. This string is registered by the Camera application as an intent filter and will therefore be activated by an intent sent via the Content.startActivity or Context.startActivityForResult methods. Other applications may also register the same string, which ...

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.