LowLightBoostClient

@DoNotMock(value = "Use canonical fakes instead.")
public interface LowLightBoostClient extends HasApiKey, OptionalModuleApi


The Low Light Boost client is used to provide availability checks and module installation. The client also provides a way to create a LowLightBoostSession.

Summary

Nested types

A callback for the module installation status.

Public methods

abstract @NonNull Task<LowLightBoostSession>

Creates a LowLightBoostSession.

abstract @NonNull Task<@NonNull Boolean>

Installs the LowLightBoost module.

abstract @NonNull Task<@NonNull Boolean>

Queries whether a camera supports low light boost.

abstract @NonNull Task<@NonNull Boolean>

Checks if the module is supported on this device.

abstract @NonNull Task<@NonNull Boolean>

Checks if the module is already installed.

abstract @NonNull Task<Void>

Marks the LowLightBoost module as no longer needed for this application.

Public methods

createSession

abstract @NonNull Task<LowLightBoostSessioncreateSession(
    @NonNull LowLightBoostOptions options,
    @NonNull LowLightBoostCallback callback
)

Creates a LowLightBoostSession.

A low light boost session manages the necessary camera capture targets for a low light capture session and provides rendering to a target surface, which the app can then display and encode as video or as a still image.

Parameters
@NonNull LowLightBoostOptions options

The options for the session.

@NonNull LowLightBoostCallback callback

An implementation of LowLightBoostCallback.

Returns
@NonNull Task<LowLightBoostSession>

A task that resolves to the created LowLightBoostSession or null if the session could not be created.

installModule

abstract @NonNull Task<@NonNull BooleaninstallModule(
    LowLightBoostClient.InstallStatusCallback installStatusCallback
)

Installs the LowLightBoost module.

Parameters
LowLightBoostClient.InstallStatusCallback installStatusCallback

A callback to receive status updates.

Returns
@NonNull Task<@NonNull Boolean>

A task that resolves to true if the module is installed successfully.

isCameraSupported

abstract @NonNull Task<@NonNull BooleanisCameraSupported(@NonNull String cameraId)

Queries whether a camera supports low light boost.

Parameters
@NonNull String cameraId

The camera id to query.

Returns
@NonNull Task<@NonNull Boolean>

A task that resolves to true if the camera supports low light boost, false otherwise.

isDeviceSupported

abstract @NonNull Task<@NonNull BooleanisDeviceSupported()

Checks if the module is supported on this device.

Only devices which support low light boost will be able to create a LowLightBoostSession.

Returns
@NonNull Task<@NonNull Boolean>

A task that resolves to true if the device is supported, false otherwise.

isModuleInstalled

abstract @NonNull Task<@NonNull BooleanisModuleInstalled()

Checks if the module is already installed.

Returns
@NonNull Task<@NonNull Boolean>

A task that resolves to true if the module is installed, false otherwise.

releaseModule

abstract @NonNull Task<VoidreleaseModule()

Marks the LowLightBoost module as no longer needed for this application. The module will be released at some point in the future.

Returns
@NonNull Task<Void>

A task that resolves when the module is released.