public final class MediaStoreOutputOptions extends OutputOptions

A class providing options for storing output to MediaStore.

Example:

ContentValues contentValues = new ContentValues();
contentValues.put(MediaStore.MediaColumns.DISPLAY_NAME, "NEW_VIDEO");
contentValues.put(MediaStore.MediaColumns.MIME_TYPE, "video/mp4");

MediaStoreOutputOptions options =
        new MediaStoreOutputOptions.Builder(
            contentResolver, MediaStore.Video.Media.EXTERNAL_CONTENT_URI)
        .setContentValues(contentValues)
        .build();

The output Uri can be obtained via getOutputUri from getOutputResults.

For more information about setting collections Uri and ContentValues, read the Access media files from shared storage and MediaStore developer guide.

Summary

Constants

Public methods

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-05-15 UTC.