CameraExtensionsInfo


public interface CameraExtensionsInfo


A camera extensions info instance that allows to observe or monitor capture request settings and results for supported camera extensions.

Applications can leverage the getCameraExtensionsInfo method to acquire a CameraExtensionsInfo object for observing extension-specific settings and results.

Summary

Public methods

default @Nullable LiveData<Integer>

Returns a LiveData which observes the extension mode changes for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

default @Nullable LiveData<Integer>

Returns a LiveData which observes the extension strength changes for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

default boolean

Returns whether reporting the currently active extension mode is supported for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

default boolean

Returns whether extension strength is supported for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

Public methods

getCurrentExtensionMode

Added in 1.4.0
default @Nullable LiveData<IntegergetCurrentExtensionMode()

Returns a LiveData which observes the extension mode changes for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

This is only available when isCurrentExtensionModeAvailable returns true. When this is supported, the initial value will be equal to the extension mode the session was started with. Then, the current extension mode may change over time. For example, when the extension mode is AUTO, the current extension mode may change to the NIGHT or HDR depending on the current lighting conditions or environment.

Returns
@Nullable LiveData<Integer>

a LiveData of Integer type to observe the extension mode changes when isCurrentExtensionModeAvailable returns true. Otherwise, returns null.

getExtensionStrength

Added in 1.4.0
default @Nullable LiveData<IntegergetExtensionStrength()

Returns a LiveData which observes the extension strength changes for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

This is only available when isExtensionStrengthAvailable returns true . When this is supported, the extension strength value will range from 0 to 100 and will dynamically change based on the latest adjustments made within the current extension mode.

Returns
@Nullable LiveData<Integer>

a LiveData of Integer type to observe the extension strength changes when isExtensionStrengthAvailable returns true. Otherwise, returns null.

isCurrentExtensionModeAvailable

Added in 1.4.0
default boolean isCurrentExtensionModeAvailable()

Returns whether reporting the currently active extension mode is supported for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

When current extension mode is supported, applications can observe the current extension value changes via the LiveData object returned by getCurrentExtensionMode.

Returns
boolean

true if current extension mode is supported. Otherwise, returns false.

isExtensionStrengthAvailable

Added in 1.4.0
default boolean isExtensionStrengthAvailable()

Returns whether extension strength is supported for the extensions-enabled camera that is associated with the CameraExtensionsInfo.

When extension strength is supported, applications can change the strength setting via setExtensionStrength and observe the strength value changes via the LiveData object returned by getExtensionStrength.

Returns
boolean

true if extension strength is supported. Otherwise, returns false.