public interface

UseCase.StateChangeCallback

 androidx.camera.core.UseCase.StateChangeCallback

Subclasses:

CameraInternal

Overview

Callback for when a UseCase transitions between active/inactive states.

Summary

Methods
public voidonUseCaseActive(UseCase useCase)

Called when a UseCase becomes active.

public voidonUseCaseInactive(UseCase useCase)

Called when a UseCase becomes inactive.

public voidonUseCaseReset(UseCase useCase)

Called when a UseCase has updated settings that require complete reset of the camera.

public voidonUseCaseUpdated(UseCase useCase)

Called when a UseCase has updated settings.

Methods

public void onUseCaseActive(UseCase useCase)

Called when a UseCase becomes active.

When a UseCase is active it expects that all data producers attached to itself should start producing data for it to consume. In addition the UseCase will start producing data that other classes can be consumed.

public void onUseCaseInactive(UseCase useCase)

Called when a UseCase becomes inactive.

When a UseCase is inactive it no longer expects data to be produced for it. In addition the UseCase will stop producing data for other classes to consume.

public void onUseCaseUpdated(UseCase useCase)

Called when a UseCase has updated settings.

When a UseCase has updated settings, it is expected that the listener will use these updated settings to reconfigure the listener's own state. A settings update is orthogonal to the active/inactive state change.

public void onUseCaseReset(UseCase useCase)

Called when a UseCase has updated settings that require complete reset of the camera.

Updating certain parameters of the use case require a full reset of the camera. This includes updating the used by the use case.