O'Reilly logo

Pro Android Media: Developing Graphics, Music, Video, and Rich Media Apps for Smartphones and Tablets by Shawn Van Every

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

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 ...

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