ViewfinderSurfaceSessionScope


public interface ViewfinderSurfaceSessionScope extends CoroutineScope


A coroutine variant of a ViewfinderSurfaceSession.

The scope will generally be active for as long as the surface needs to be written into, so surface should not be used outside of this scope.

Summary

Public methods

abstract @NonNull ViewfinderSurfaceRequest

The ViewfinderSurfaceRequest responsible for this session.

abstract @NonNull Surface

The android.view.Surface available for this session.

Public methods

getRequest

Added in 1.5.0-beta01
abstract @NonNull ViewfinderSurfaceRequest getRequest()

The ViewfinderSurfaceRequest responsible for this session.

getSurface

Added in 1.5.0-beta01
abstract @NonNull Surface getSurface()

The android.view.Surface available for this session. Users of this surface should not call Surface.release. It will automatically be closed at some time after this scope has exited.