diff --git a/res/layout/gallery_grid_item_view.xml b/res/layout/gallery_grid_item_view.xml
index 8b7ee58..f474a6b 100644
--- a/res/layout/gallery_grid_item_view.xml
+++ b/res/layout/gallery_grid_item_view.xml
@@ -43,4 +43,14 @@
         android:paddingTop="4dp"
         android:visibility="gone"
         android:contentDescription="@string/gallery_checkbox_content_description" />
+
+    <!-- Play button image for video contents only -->
+    <ImageView
+        android:id="@+id/video_thumbnail_play_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:background="@color/background_item_transparent"
+        android:src="@drawable/ic_video_play_light"
+        android:visibility="gone" />
 </com.android.messaging.ui.mediapicker.GalleryGridItemView>
diff --git a/res/layout/mediapicker_image_chooser.xml b/res/layout/mediapicker_gallery_chooser.xml
similarity index 100%
rename from res/layout/mediapicker_image_chooser.xml
rename to res/layout/mediapicker_gallery_chooser.xml
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0e91156..521b1fa 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -53,7 +53,7 @@
     <string name="mediapicker_cameraChooserDescription">Capture pictures or video</string>
     <string name="mediapicker_galleryChooserDescription">Choose images from this device</string>
     <string name="mediapicker_audioChooserDescription">Record audio</string>
-    <string name="mediapicker_gallery_title">Choose photo</string>
+    <string name="mediapicker_gallery_title">Choose media</string>
     <string name="mediapicker_gallery_item_selected_content_description">The media is selected.</string>
     <string name="mediapicker_gallery_item_unselected_content_description">The media is unselected.</string>
     <string name="mediapicker_gallery_title_selection"><xliff:g id="count">%d</xliff:g> selected</string>
diff --git a/src/com/android/messaging/datamodel/GalleryBoundCursorLoader.java b/src/com/android/messaging/datamodel/GalleryBoundCursorLoader.java
index 28ec303..a820ac1 100644
--- a/src/com/android/messaging/datamodel/GalleryBoundCursorLoader.java
+++ b/src/com/android/messaging/datamodel/GalleryBoundCursorLoader.java
@@ -20,7 +20,7 @@
 import android.net.Uri;
 import android.provider.MediaStore.Files;
 import android.provider.MediaStore.Files.FileColumns;
-import android.provider.MediaStore.Images.Media;
+import android.provider.MediaStore.MediaColumns;
 
 import com.android.messaging.datamodel.data.GalleryGridItemData;
 import com.android.messaging.datamodel.data.MessagePartData;
@@ -32,18 +32,18 @@
 public class GalleryBoundCursorLoader extends BoundCursorLoader {
     public static final String MEDIA_SCANNER_VOLUME_EXTERNAL = "external";
     private static final Uri STORAGE_URI = Files.getContentUri(MEDIA_SCANNER_VOLUME_EXTERNAL);
-    private static final String SORT_ORDER = Media.DATE_MODIFIED + " DESC";
-    private static final String IMAGE_SELECTION = createSelection(
-            MessagePartData.ACCEPTABLE_IMAGE_TYPES,
-            new Integer[] { FileColumns.MEDIA_TYPE_IMAGE });
+    private static final String SORT_ORDER = MediaColumns.DATE_MODIFIED + " DESC";
+    private static final String SELECTION = createSelection(
+            MessagePartData.ACCEPTABLE_GALLERY_MEDIA_TYPES,
+            new Integer[] {FileColumns.MEDIA_TYPE_IMAGE, FileColumns.MEDIA_TYPE_VIDEO});
 
     public GalleryBoundCursorLoader(final String bindingId, final Context context) {
-        super(bindingId, context, STORAGE_URI, GalleryGridItemData.IMAGE_PROJECTION,
-                IMAGE_SELECTION, null, SORT_ORDER);
+        super(bindingId, context, STORAGE_URI, GalleryGridItemData.MEDIA_PROJECTION, SELECTION,
+                null, SORT_ORDER);
     }
 
     private static String createSelection(final String[] mimeTypes, Integer[] mediaTypes) {
-        return Media.MIME_TYPE + " IN ('" + Joiner.on("','").join(mimeTypes) + "') AND "
+        return MediaColumns.MIME_TYPE + " IN ('" + Joiner.on("','").join(mimeTypes) + "') AND "
                 + FileColumns.MEDIA_TYPE + " IN (" + Joiner.on(',').join(mediaTypes) + ")";
     }
 }
diff --git a/src/com/android/messaging/datamodel/data/GalleryGridItemData.java b/src/com/android/messaging/datamodel/data/GalleryGridItemData.java
index 6649757..1536897 100644
--- a/src/com/android/messaging/datamodel/data/GalleryGridItemData.java
+++ b/src/com/android/messaging/datamodel/data/GalleryGridItemData.java
@@ -20,25 +20,27 @@
 import android.graphics.Rect;
 import android.net.Uri;
 import android.provider.BaseColumns;
-import android.provider.MediaStore.Images.Media;
+import android.provider.MediaStore.MediaColumns;
 import android.text.TextUtils;
 
 import com.android.messaging.datamodel.media.FileImageRequestDescriptor;
 import com.android.messaging.datamodel.media.ImageRequest;
 import com.android.messaging.datamodel.media.UriImageRequestDescriptor;
+import com.android.messaging.datamodel.media.VideoThumbnailRequestDescriptor;
 import com.android.messaging.util.Assert;
+import com.android.messaging.util.ContentType;
 
 /**
  * Provides data for GalleryGridItemView
  */
 public class GalleryGridItemData {
-    public static final String[] IMAGE_PROJECTION = new String[] {
-        Media._ID,
-        Media.DATA,
-        Media.WIDTH,
-        Media.HEIGHT,
-        Media.MIME_TYPE,
-        Media.DATE_MODIFIED};
+    public static final String[] MEDIA_PROJECTION = new String[] {
+        MediaColumns._ID,
+        MediaColumns.DATA,
+        MediaColumns.WIDTH,
+        MediaColumns.HEIGHT,
+        MediaColumns.MIME_TYPE,
+        MediaColumns.DATE_MODIFIED};
 
     public static final String[] SPECIAL_ITEM_COLUMNS = new String[] {
         BaseColumns._ID
@@ -46,14 +48,14 @@
 
     private static final int INDEX_ID = 0;
 
-    // For local image gallery.
+    // For local media gallery.
     private static final int INDEX_DATA_PATH = 1;
     private static final int INDEX_WIDTH = 2;
     private static final int INDEX_HEIGHT = 3;
     private static final int INDEX_MIME_TYPE = 4;
     private static final int INDEX_DATE_MODIFIED = 5;
 
-    /** A special item's id for picking images from document picker */
+    /** A special item's id for picking a media from document picker */
     public static final String ID_DOCUMENT_PICKER_ITEM = "-1";
 
     private UriImageRequestDescriptor mImageData;
@@ -85,15 +87,24 @@
             mContentType = cursor.getString(INDEX_MIME_TYPE);
             final String dateModified = cursor.getString(INDEX_DATE_MODIFIED);
             mDateSeconds = !TextUtils.isEmpty(dateModified) ? Long.parseLong(dateModified) : -1;
-            mImageData = new FileImageRequestDescriptor(
-                    cursor.getString(INDEX_DATA_PATH),
-                    desiredWidth,
-                    desiredHeight,
-                    sourceWidth,
-                    sourceHeight,
-                    true /* canUseThumbnail */,
-                    true /* allowCompression */,
-                    true /* isStatic */);
+            if (ContentType.isVideoType(mContentType)) {
+                mImageData = new VideoThumbnailRequestDescriptor(
+                        cursor.getLong(INDEX_ID),
+                        desiredWidth,
+                        desiredHeight,
+                        sourceWidth,
+                        sourceHeight);
+            } else {
+                mImageData = new FileImageRequestDescriptor(
+                        cursor.getString(INDEX_DATA_PATH),
+                        desiredWidth,
+                        desiredHeight,
+                        sourceWidth,
+                        sourceHeight,
+                        true /* canUseThumbnail */,
+                        true /* allowCompression */,
+                        true /* isStatic */);
+            }
         }
     }
 
diff --git a/src/com/android/messaging/datamodel/data/MediaPickerData.java b/src/com/android/messaging/datamodel/data/MediaPickerData.java
index 7fef67f..5a2ef33 100644
--- a/src/com/android/messaging/datamodel/data/MediaPickerData.java
+++ b/src/com/android/messaging/datamodel/data/MediaPickerData.java
@@ -51,7 +51,7 @@
         mGalleryLoaderCallbacks = new GalleryLoaderCallbacks();
     }
 
-    public static final int GALLERY_IMAGE_LOADER = 1;
+    public static final int GALLERY_MEDIA_LOADER = 1;
 
     /**
      * A trampoline class so that we can inherit from LoaderManager.LoaderCallbacks multiple times.
@@ -63,7 +63,7 @@
             // Check if data still bound to the requesting ui element
             if (isBound(bindingId)) {
                 switch (id) {
-                    case GALLERY_IMAGE_LOADER:
+                    case GALLERY_MEDIA_LOADER:
                         return new GalleryBoundCursorLoader(bindingId, mContext);
 
                     default:
@@ -84,9 +84,9 @@
             final BoundCursorLoader cursorLoader = (BoundCursorLoader) loader;
             if (isBound(cursorLoader.getBindingId())) {
                 switch (loader.getId()) {
-                    case GALLERY_IMAGE_LOADER:
+                    case GALLERY_MEDIA_LOADER:
                         mListener.onMediaPickerDataUpdated(MediaPickerData.this, data,
-                                GALLERY_IMAGE_LOADER);
+                                GALLERY_MEDIA_LOADER);
                         break;
 
                     default:
@@ -106,9 +106,9 @@
             final BoundCursorLoader cursorLoader = (BoundCursorLoader) loader;
             if (isBound(cursorLoader.getBindingId())) {
                 switch (loader.getId()) {
-                    case GALLERY_IMAGE_LOADER:
+                    case GALLERY_MEDIA_LOADER:
                         mListener.onMediaPickerDataUpdated(MediaPickerData.this, null,
-                                GALLERY_IMAGE_LOADER);
+                                GALLERY_MEDIA_LOADER);
                         break;
 
                     default:
@@ -129,7 +129,7 @@
             args = new Bundle();
         }
         args.putString(BINDING_ID, binding.getBindingId());
-        if (loaderId == GALLERY_IMAGE_LOADER) {
+        if (loaderId == GALLERY_MEDIA_LOADER) {
             mLoaderManager.initLoader(loaderId, args, mGalleryLoaderCallbacks).forceLoad();
         } else {
             Assert.fail("Unsupported loader id for media picker!");
@@ -149,7 +149,7 @@
     protected void unregisterListeners() {
         // This could be null if we bind but the caller doesn't init the BindableData
         if (mLoaderManager != null) {
-            mLoaderManager.destroyLoader(GALLERY_IMAGE_LOADER);
+            mLoaderManager.destroyLoader(GALLERY_MEDIA_LOADER);
             mLoaderManager = null;
         }
     }
@@ -172,4 +172,4 @@
                 selectedIndex);
     }
 
-}
\ No newline at end of file
+}
diff --git a/src/com/android/messaging/datamodel/data/MessagePartData.java b/src/com/android/messaging/datamodel/data/MessagePartData.java
index 1bb024d..a6d825c 100644
--- a/src/com/android/messaging/datamodel/data/MessagePartData.java
+++ b/src/com/android/messaging/datamodel/data/MessagePartData.java
@@ -52,9 +52,17 @@
  */
 public class MessagePartData implements Parcelable {
     public static final int UNSPECIFIED_SIZE = MessagingContentProvider.UNSPECIFIED_SIZE;
-    public static final String[] ACCEPTABLE_IMAGE_TYPES =
-            new String[] { ContentType.IMAGE_JPEG, ContentType.IMAGE_JPG, ContentType.IMAGE_PNG,
-                ContentType.IMAGE_GIF };
+
+    public static final String[] ACCEPTABLE_GALLERY_MEDIA_TYPES =
+            new String[] {
+                // Acceptable image types
+                ContentType.IMAGE_JPEG, ContentType.IMAGE_JPG, ContentType.IMAGE_PNG,
+                ContentType.IMAGE_GIF, ContentType.IMAGE_WBMP, ContentType.IMAGE_X_MS_BMP,
+                // Acceptable video types
+                ContentType.VIDEO_3GP, ContentType.VIDEO_3GPP, ContentType.VIDEO_3G2,
+                ContentType.VIDEO_H263, ContentType.VIDEO_M4V, ContentType.VIDEO_MP4,
+                ContentType.VIDEO_MPEG, ContentType.VIDEO_MPEG4, ContentType.VIDEO_WEBM
+            };
 
     private static final String[] sProjection = {
         PartColumns._ID,
diff --git a/src/com/android/messaging/datamodel/media/UriImageRequestDescriptor.java b/src/com/android/messaging/datamodel/media/UriImageRequestDescriptor.java
index c5685d1..dae293a 100644
--- a/src/com/android/messaging/datamodel/media/UriImageRequestDescriptor.java
+++ b/src/com/android/messaging/datamodel/media/UriImageRequestDescriptor.java
@@ -87,9 +87,4 @@
             return new NetworkUriImageRequest<UriImageRequestDescriptor>(context, this);
         }
     }
-
-    /** ID of the resource in MediaStore or null if this resource didn't come from MediaStore */
-    public Long getMediaStoreId() {
-        return null;
-    }
-}
\ No newline at end of file
+}
diff --git a/src/com/android/messaging/datamodel/media/VideoThumbnailRequest.java b/src/com/android/messaging/datamodel/media/VideoThumbnailRequest.java
index 219e0a6..73ce5e0 100644
--- a/src/com/android/messaging/datamodel/media/VideoThumbnailRequest.java
+++ b/src/com/android/messaging/datamodel/media/VideoThumbnailRequest.java
@@ -16,15 +16,11 @@
 
 package com.android.messaging.datamodel.media;
 
-import android.content.ContentResolver;
 import android.content.Context;
 import android.graphics.Bitmap;
-import android.provider.MediaStore.Video.Thumbnails;
 
-import com.android.messaging.Factory;
 import com.android.messaging.util.MediaMetadataRetrieverWrapper;
 import com.android.messaging.util.MediaUtil;
-import com.android.messaging.util.OsUtil;
 
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -57,19 +53,15 @@
 
     @Override
     protected Bitmap getBitmapForResource() throws IOException {
-        final Long mediaId = mDescriptor.getMediaStoreId();
         Bitmap bitmap = null;
-        if (mediaId != null) {
-            final ContentResolver cr = Factory.get().getApplicationContext().getContentResolver();
-            bitmap = Thumbnails.getThumbnail(cr, mediaId, Thumbnails.MICRO_KIND, null);
-        } else {
-            final MediaMetadataRetrieverWrapper retriever = new MediaMetadataRetrieverWrapper();
-            try {
-                retriever.setDataSource(mDescriptor.uri);
-                bitmap = retriever.getFrameAtTime();
-            } finally {
-                retriever.release();
-            }
+        // Get a thumbnail through MediaMetadataRetriever to get a representative frame at any time
+        // position instead.
+        final MediaMetadataRetrieverWrapper retriever = new MediaMetadataRetrieverWrapper();
+        try {
+            retriever.setDataSource(mDescriptor.uri);
+            bitmap = retriever.getFrameAtTime();
+        } finally {
+            retriever.release();
         }
         if (bitmap != null) {
             mDescriptor.updateSourceDimensions(bitmap.getWidth(), bitmap.getHeight());
diff --git a/src/com/android/messaging/datamodel/media/VideoThumbnailRequestDescriptor.java b/src/com/android/messaging/datamodel/media/VideoThumbnailRequestDescriptor.java
index 907bb8f..22f1871 100644
--- a/src/com/android/messaging/datamodel/media/VideoThumbnailRequestDescriptor.java
+++ b/src/com/android/messaging/datamodel/media/VideoThumbnailRequestDescriptor.java
@@ -21,24 +21,17 @@
 import com.android.messaging.util.UriUtil;
 
 public class VideoThumbnailRequestDescriptor extends UriImageRequestDescriptor {
-    protected final long mMediaId;
-    public VideoThumbnailRequestDescriptor(final long id, String path, int desiredWidth,
-            int desiredHeight, int sourceWidth, int sourceHeight) {
-        super(UriUtil.getUriForResourceFile(path), desiredWidth, desiredHeight, sourceWidth,
+    public VideoThumbnailRequestDescriptor(final long id, int desiredWidth, int desiredHeight,
+            int sourceWidth, int sourceHeight) {
+        super(UriUtil.getContentUriForMediaStoreId(id), desiredWidth, desiredHeight, sourceWidth,
                 sourceHeight, false /* canCompress */, false /* isStatic */,
                 false /* cropToCircle */,
                 ImageUtils.DEFAULT_CIRCLE_BACKGROUND_COLOR /* circleBackgroundColor */,
                 ImageUtils.DEFAULT_CIRCLE_STROKE_COLOR /* circleStrokeColor */);
-        mMediaId = id;
     }
 
     @Override
     public MediaRequest<ImageResource> buildSyncMediaRequest(Context context) {
         return new VideoThumbnailRequest(context, this);
     }
-
-    @Override
-    public Long getMediaStoreId() {
-        return mMediaId;
-    }
 }
diff --git a/src/com/android/messaging/ui/UIIntents.java b/src/com/android/messaging/ui/UIIntents.java
index e5f8a52..b09c457 100644
--- a/src/com/android/messaging/ui/UIIntents.java
+++ b/src/com/android/messaging/ui/UIIntents.java
@@ -44,8 +44,8 @@
     // Sending draft data (from share intent / message forwarding) to the ConversationActivity.
     public static final String UI_INTENT_EXTRA_DRAFT_DATA = "draft_data";
 
-    // The request code for picking image from the Document picker.
-    public static final int REQUEST_PICK_IMAGE_FROM_DOCUMENT_PICKER = 1400;
+    // The request code for picking a media from the Document picker.
+    public static final int REQUEST_PICK_MEDIA_FROM_DOCUMENT_PICKER = 1400;
 
     // Indicates what type of notification this applies to (See BugleNotifications:
     // UPDATE_NONE, UPDATE_MESSAGES, UPDATE_ERRORS, UPDATE_ALL)
@@ -166,7 +166,8 @@
     public abstract void launchAddContactActivity(final Context context, final String destination);
 
     /**
-     * Launch an activity to show the document picker to pick an image.
+     * Launch an activity to show the document picker to pick an image/video.
+     *
      * @param fragment the requesting fragment
      */
     public abstract void launchDocumentImagePicker(final Fragment fragment);
diff --git a/src/com/android/messaging/ui/UIIntentsImpl.java b/src/com/android/messaging/ui/UIIntentsImpl.java
index fb624ad..ac430cd 100644
--- a/src/com/android/messaging/ui/UIIntentsImpl.java
+++ b/src/com/android/messaging/ui/UIIntentsImpl.java
@@ -236,11 +236,11 @@
     @Override
     public void launchDocumentImagePicker(final Fragment fragment) {
         final Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
-        intent.putExtra(Intent.EXTRA_MIME_TYPES, MessagePartData.ACCEPTABLE_IMAGE_TYPES);
+        intent.putExtra(Intent.EXTRA_MIME_TYPES, MessagePartData.ACCEPTABLE_GALLERY_MEDIA_TYPES);
         intent.addCategory(Intent.CATEGORY_OPENABLE);
-        intent.setType(ContentType.IMAGE_UNSPECIFIED);
+        intent.setType(ContentType.ANY_TYPE);
 
-        fragment.startActivityForResult(intent, REQUEST_PICK_IMAGE_FROM_DOCUMENT_PICKER);
+        fragment.startActivityForResult(intent, REQUEST_PICK_MEDIA_FROM_DOCUMENT_PICKER);
     }
 
     @Override
diff --git a/src/com/android/messaging/ui/mediapicker/DocumentImagePicker.java b/src/com/android/messaging/ui/mediapicker/DocumentImagePicker.java
index bb267da..1e52dc4 100644
--- a/src/com/android/messaging/ui/mediapicker/DocumentImagePicker.java
+++ b/src/com/android/messaging/ui/mediapicker/DocumentImagePicker.java
@@ -30,8 +30,8 @@
 import com.android.messaging.util.SafeAsyncTask;
 
 /**
- * Wraps around the functionalities to allow the user to pick images from the document
- * picker.  Instances of this class must be tied to a Fragment which is able to delegate activity
+ * Wraps around the functionalities to allow the user to pick an image/video from the document
+ * picker. Instances of this class must be tied to a Fragment which is able to delegate activity
  * result callbacks.
  */
 public class DocumentImagePicker {
@@ -79,8 +79,8 @@
      * Must be called from the fragment/activity's onActivityResult().
      */
     public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
-        if (requestCode == UIIntents.REQUEST_PICK_IMAGE_FROM_DOCUMENT_PICKER &&
-                resultCode == Activity.RESULT_OK) {
+        if (requestCode == UIIntents.REQUEST_PICK_MEDIA_FROM_DOCUMENT_PICKER
+                && resultCode == Activity.RESULT_OK) {
             // Sometimes called after media item has been picked from the document picker.
             String url = data.getStringExtra(EXTRA_PHOTO_URL);
             if (url == null) {
diff --git a/src/com/android/messaging/ui/mediapicker/GalleryGridItemView.java b/src/com/android/messaging/ui/mediapicker/GalleryGridItemView.java
index 3d71fe6..4337d5e 100644
--- a/src/com/android/messaging/ui/mediapicker/GalleryGridItemView.java
+++ b/src/com/android/messaging/ui/mediapicker/GalleryGridItemView.java
@@ -24,13 +24,14 @@
 import android.view.View;
 import android.widget.CheckBox;
 import android.widget.FrameLayout;
-import android.widget.ImageView.ScaleType;
+import android.widget.ImageView;
 
 import com.android.messaging.R;
 import com.android.messaging.datamodel.DataModel;
 import com.android.messaging.datamodel.data.GalleryGridItemData;
 import com.android.messaging.ui.AsyncImageView;
 import com.android.messaging.ui.ConversationDrawables;
+import com.android.messaging.util.ContentType;
 import com.google.common.annotations.VisibleForTesting;
 
 import java.util.concurrent.TimeUnit;
@@ -135,17 +136,24 @@
     }
 
     private void updateImageView() {
+        ImageView playButton = (ImageView) findViewById(R.id.video_thumbnail_play_button);
         if (mData.isDocumentPickerItem()) {
-            mImageView.setScaleType(ScaleType.CENTER);
+            mImageView.setScaleType(ImageView.ScaleType.CENTER);
             setBackgroundColor(ConversationDrawables.get().getConversationThemeColor());
             mImageView.setImageResourceId(null);
             mImageView.setImageResource(R.drawable.ic_photo_library_light);
+            playButton.setVisibility(GONE);
             mImageView.setContentDescription(getResources().getString(
                     R.string.pick_image_from_document_library_content_description));
         } else {
-            mImageView.setScaleType(ScaleType.CENTER_CROP);
+            mImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
             setBackgroundColor(getResources().getColor(R.color.gallery_image_default_background));
             mImageView.setImageResourceId(mData.getImageRequestDescriptor());
+            if (ContentType.isVideoType(mData.getContentType())) {
+                playButton.setVisibility(VISIBLE);
+            } else {
+                playButton.setVisibility(GONE);
+            }
             final long dateSeconds = mData.getDateSeconds();
             final boolean isValidDate = (dateSeconds > 0);
             final int templateId = isValidDate ?
diff --git a/src/com/android/messaging/ui/mediapicker/GalleryGridView.java b/src/com/android/messaging/ui/mediapicker/GalleryGridView.java
index 2265dd5..39912f9 100644
--- a/src/com/android/messaging/ui/mediapicker/GalleryGridView.java
+++ b/src/com/android/messaging/ui/mediapicker/GalleryGridView.java
@@ -43,16 +43,16 @@
 import java.util.Map;
 
 /**
- * Shows a list of galley images from external storage in a GridView with multi-select
- * capabilities, and with the option to intent out to a standalone image picker.
+ * Shows a list of galley mediae from external storage in a GridView with multi-select capabilities,
+ * and with the option to intent out to a standalone media picker.
  */
 public class GalleryGridView extends MediaPickerGridView implements
         GalleryGridItemView.HostInterface,
         PersistentInstanceState,
         DraftMessageDataListener {
     /**
-     * Implemented by the owner of this GalleryGridView instance to communicate on image
-     * picking and multi-image selection events.
+     * Implemented by the owner of this GalleryGridView instance to communicate on media picking and
+     * multi-media selection events.
      */
     public interface GalleryGridViewListener {
         void onDocumentPickerItemClicked();
@@ -127,7 +127,7 @@
             final MessagePartData item = mSelectedImages.remove(data.getImageUri());
             mListener.onItemUnselected(item);
             if (mSelectedImages.size() == 0) {
-                // No image is selected any more, turn off multi-select mode.
+                // No media is selected any more, turn off multi-select mode.
                 setMultiSelectEnabled(false);
             }
         } else {
diff --git a/src/com/android/messaging/ui/mediapicker/GalleryMediaChooser.java b/src/com/android/messaging/ui/mediapicker/GalleryMediaChooser.java
index 1b8c2dc..8db13db 100644
--- a/src/com/android/messaging/ui/mediapicker/GalleryMediaChooser.java
+++ b/src/com/android/messaging/ui/mediapicker/GalleryMediaChooser.java
@@ -63,7 +63,7 @@
         mAdapter.setHostInterface(null);
         // The loader is started only if startMediaPickerDataLoader() is called
         if (OsUtil.hasStoragePermission()) {
-            mBindingRef.getData().destroyLoader(MediaPickerData.GALLERY_IMAGE_LOADER);
+            mBindingRef.getData().destroyLoader(MediaPickerData.GALLERY_MEDIA_LOADER);
         }
         return super.destroyView();
     }
@@ -121,7 +121,7 @@
     protected View createView(final ViewGroup container) {
         final LayoutInflater inflater = getLayoutInflater();
         final View view = inflater.inflate(
-                R.layout.mediapicker_image_chooser,
+                R.layout.mediapicker_gallery_chooser,
                 container /* root */,
                 false /* attachToRoot */);
 
@@ -167,7 +167,7 @@
     public void onMediaPickerDataUpdated(final MediaPickerData mediaPickerData, final Object data,
             final int loaderId) {
         mBindingRef.ensureBound(mediaPickerData);
-        Assert.equals(MediaPickerData.GALLERY_IMAGE_LOADER, loaderId);
+        Assert.equals(MediaPickerData.GALLERY_MEDIA_LOADER, loaderId);
         Cursor rawCursor = null;
         if (data instanceof Cursor) {
             rawCursor = (Cursor) data;
@@ -202,8 +202,9 @@
     }
 
     private void startMediaPickerDataLoader() {
-        mBindingRef.getData().startLoader(MediaPickerData.GALLERY_IMAGE_LOADER, mBindingRef, null,
-                this);
+        mBindingRef
+                .getData()
+                .startLoader(MediaPickerData.GALLERY_MEDIA_LOADER, mBindingRef, null, this);
     }
 
     @Override
diff --git a/src/com/android/messaging/ui/mediapicker/MediaPicker.java b/src/com/android/messaging/ui/mediapicker/MediaPicker.java
index 8e5198b..b8fce8f 100644
--- a/src/com/android/messaging/ui/mediapicker/MediaPicker.java
+++ b/src/com/android/messaging/ui/mediapicker/MediaPicker.java
@@ -159,7 +159,7 @@
     @VisibleForTesting
     final Binding<MediaPickerData> mBinding = BindingBase.createBinding(this);
 
-    /** Handles picking image from the document picker */
+    /** Handles picking a media from the document picker. */
     private DocumentImagePicker mDocumentImagePicker;
 
     /** Provides subscription-related data to access per-subscription configurations. */
diff --git a/src/com/android/messaging/util/UriUtil.java b/src/com/android/messaging/util/UriUtil.java
index 0e931c4..ceff50c 100644
--- a/src/com/android/messaging/util/UriUtil.java
+++ b/src/com/android/messaging/util/UriUtil.java
@@ -26,6 +26,7 @@
 import android.text.TextUtils;
 
 import com.android.messaging.Factory;
+import com.android.messaging.datamodel.GalleryBoundCursorLoader;
 import com.android.messaging.datamodel.MediaScratchFileProvider;
 import com.android.messaging.util.Assert.DoesNotRunOnMainThread;
 import com.google.common.io.ByteStreams;
@@ -130,6 +131,18 @@
     }
 
     /**
+     * Gets the content:// style URI for the given MediaStore row Id in the files table on the
+     * external volume.
+     *
+     * @param id the MediaStore row Id to get the URI for
+     * @return the URI to the files table on the external storage.
+     */
+    public static Uri getContentUriForMediaStoreId(final long id) {
+        return MediaStore.Files.getContentUri(
+                GalleryBoundCursorLoader.MEDIA_SCANNER_VOLUME_EXTERNAL, id);
+    }
+
+    /**
      * Gets the size in bytes for the content uri. Currently we only support content in the
      * scratch space.
      */
diff --git a/tests/src/com/android/messaging/datamodel/data/TestDataFactory.java b/tests/src/com/android/messaging/datamodel/data/TestDataFactory.java
index 8527e2b..033caa2 100644
--- a/tests/src/com/android/messaging/datamodel/data/TestDataFactory.java
+++ b/tests/src/com/android/messaging/datamodel/data/TestDataFactory.java
@@ -279,7 +279,7 @@
                 new Object[] { Long.valueOf(1), "/sdcard/image2", 200, 200, "image/png" },
                 new Object[] { Long.valueOf(2), "/sdcard/image3", 300, 300, "image/jpeg" },
         };
-        return new FakeCursor(GalleryGridItemData.IMAGE_PROJECTION, sGalleryCursorColumns,
+        return new FakeCursor(GalleryGridItemData.MEDIA_PROJECTION, sGalleryCursorColumns,
                 cursorData);
     }
 
diff --git a/tests/src/com/android/messaging/ui/mediapicker/MediaPickerTest.java b/tests/src/com/android/messaging/ui/mediapicker/MediaPickerTest.java
index 4a7040e..eaf9338 100644
--- a/tests/src/com/android/messaging/ui/mediapicker/MediaPickerTest.java
+++ b/tests/src/com/android/messaging/ui/mediapicker/MediaPickerTest.java
@@ -97,7 +97,7 @@
     public void testDefaultTabs() {
         Mockito.when(mMockMediaPickerData.getSelectedChooserIndex()).thenReturn(0);
         initFragment(MediaPicker.MEDIA_TYPE_ALL, new Integer[] {
-                MediaPickerData.GALLERY_IMAGE_LOADER },
+                MediaPickerData.GALLERY_MEDIA_LOADER },
                 false);
         final MediaPicker mediaPicker = getFragment();
         final View view = mediaPicker.getView();
@@ -114,7 +114,7 @@
     public void testFilterTabsBeforeAttach() {
         Mockito.when(mMockMediaPickerData.getSelectedChooserIndex()).thenReturn(0);
         initFragment(MediaPicker.MEDIA_TYPE_IMAGE, new Integer[] {
-                MediaPickerData.GALLERY_IMAGE_LOADER },
+                MediaPickerData.GALLERY_MEDIA_LOADER },
                 true);
         final MediaPicker mediaPicker = getFragment();
         final View view = mediaPicker.getView();
