ViewfinderSurfaceProvider


public interface ViewfinderSurfaceProvider


A interface implemented by the application to provide a Surface for viewfinder.

This interface is implemented by the application to provide a Surface. This will be called by application when it needs a Surface for viewfinder. It also signals when the Surface is no longer in use.

Summary

Public methods

abstract void

Called when a new Surface has been requested by the frame producer.

Public methods

onSurfaceRequested

Added in 1.4.0-alpha10
abstract void onSurfaceRequested(@NonNull ViewfinderSurfaceRequest request)

Called when a new Surface has been requested by the frame producer.

This is called every time a new surface is required to keep the viewfinder running. The producer may repeatedly request surfaces, but only a single request will be active at a time.

Parameters
@NonNull ViewfinderSurfaceRequest request

the request for a surface which contains the requirements of the surface and methods for completing the request.