MediaStoreOutputOptions

public final class MediaStoreOutputOptions
extends OutputOptions

java.lang.Object
   ↳ androidx.camera.video.OutputOptions
     ↳ androidx.camera.video.MediaStoreOutputOptions


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 OutputResults.getOutputUri() from VideoRecordEvent.Finalize.getOutputResults().

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

Summary

Nested classes

class MediaStoreOutputOptions.Builder

The builder of the MediaStoreOutputOptions object. 

Inherited constants

Fields

public static final ContentValues EMPTY_CONTENT_VALUES

An empty ContentValues.

Public methods

boolean equals(Object o)
Uri getCollectionUri()

Gets the URI of the collection to insert into.

ContentResolver getContentResolver()

Gets the ContentResolver instance.

ContentValues getContentValues()

Gets the content values to be included in the created video row.

long getFileSizeLimit()

Gets the limit for the file length in bytes.

int hashCode()
String toString()

Inherited methods