public enum ImplementationMode extends Enum


The implementation mode of a Viewfinder.

User preference on how the viewfinder should render the viewfinder. The viewfinder is displayed with either a SurfaceView/AndroidExternalSurface or a TextureView/AndroidEmbeddedExternalSurface.

  • EXTERNAL uses a SurfaceView/AndroidExternalSurface, it is generally better when it comes to certain key metrics, including power and latency.

  • EMBEDDED uses a TextureView/AndroidEmbeddedExternalSurface it is better supported by a wider range of devices.

The option is used to decide what is the best internal implementation given the device capabilities and user configurations.

Summary

Enum Values

EMBEDDED

Use a TextureView/AndroidEmbeddedExternalSurface for the Viewfinder.

EXTERNAL

Use a SurfaceView/AndroidExternalSurface for the Viewfinder when possible.

Public methods

final @NonNull EnumEntries<@NonNull ImplementationMode>

The implementation mode of a Viewfinder.

final @NonNull ImplementationMode

Returns the enum constant of this type with the specified name.

final @NonNull ImplementationMode[]

Returns an array containing the constants of this enum type, in the order they're declared.

Enum Values

EMBEDDED

ImplementationMode ImplementationMode.EMBEDDED

Use a TextureView/AndroidEmbeddedExternalSurface for the Viewfinder.

EXTERNAL

ImplementationMode ImplementationMode.EXTERNAL

Use a SurfaceView/AndroidExternalSurface for the Viewfinder when possible. It has somewhat lower latency and less performance and power overhead. It offers more control on a single drawing board, but does not support certain animations.

Public methods

getEntries

public final @NonNull EnumEntries<@NonNull ImplementationModegetEntries()

The implementation mode of a Viewfinder.

User preference on how the viewfinder should render the viewfinder. The viewfinder is displayed with either a SurfaceView/AndroidExternalSurface or a TextureView/AndroidEmbeddedExternalSurface.

  • EXTERNAL uses a SurfaceView/AndroidExternalSurface, it is generally better when it comes to certain key metrics, including power and latency.

  • EMBEDDED uses a TextureView/AndroidEmbeddedExternalSurface it is better supported by a wider range of devices.

The option is used to decide what is the best internal implementation given the device capabilities and user configurations.

valueOf

Added in 1.4.0-alpha11
public final @NonNull ImplementationMode valueOf(@NonNull String value)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

Added in 1.4.0-alpha11
public final @NonNull ImplementationMode[] values()

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.