Adding Video Metadata

As we discussed in Chapter 9, Android's MediaStore content provider has a portion, MediaStore.Video, dedicated to video in addition to the portions for image and audio files and metadata that we have previously looked at.

When triggering the Camera application via an intent, the Uri to the newly recorded video file that is returned is a content:// style Uri, which is used in combination with a content provider—in this case, the MediaStore. In order to add additional metadata, we can use the Uri returned to update the video's record in the MediaStore.

As with any content provider, we use the update method on a ContentResolver object obtained from our Context. We pass in the content:// style Uri and the new data in the form ...

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.