public abstract class

OutputFileResults

extends java.lang.Object

 java.lang.Object

↳androidx.camera.view.video.OutputFileResults

Gradle dependencies

compile group: 'androidx.camera', name: 'camera-view', version: '1.2.0-alpha01'

  • groupId: androidx.camera
  • artifactId: camera-view
  • version: 1.2.0-alpha01

Artifact androidx.camera:camera-view:1.2.0-alpha01 it located at Google repository (https://maven.google.com/)

Overview

Info about the saved video file.

Summary

Methods
public static OutputFileResultscreate(Uri savedUri)

public abstract UrigetSavedUri()

Returns the of the saved video file.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public static OutputFileResults create(Uri savedUri)

public abstract Uri getSavedUri()

Returns the of the saved video file.

Returns:

URI of saved video file if the OutputFileOptions is backed by using OutputFileOptions.builder(ContentResolver, Uri, ContentValues), null otherwise.

Source

/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.camera.view.video;

import android.content.ContentResolver;
import android.content.ContentValues;
import android.net.Uri;
import android.provider.MediaStore;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;

import com.google.auto.value.AutoValue;

/**
 * Info about the saved video file.
 */
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
@ExperimentalVideo
@AutoValue
public abstract class OutputFileResults {

    // Restrict constructor to package
    OutputFileResults() {
    }

    /** @hide */
    @RestrictTo(RestrictTo.Scope.LIBRARY)
    @NonNull
    public static OutputFileResults create(@Nullable Uri savedUri) {
        return new AutoValue_OutputFileResults(savedUri);
    }

    /**
     * Returns the {@link Uri} of the saved video file.
     *
     * @return URI of saved video file if the {@link OutputFileOptions} is backed by
     * {@link MediaStore} using
     * {@link OutputFileOptions#builder(ContentResolver, Uri, ContentValues)}, {@code null}
     * otherwise.
     */
    @Nullable
    public abstract Uri getSavedUri();
}