BitmapFrameSource

Defined in package com.scandit.datacapture.core.source

BitmapFrameSource
class BitmapFrameSource : FrameSource

Added in version 6.3.0

Emits a frame from the provided Bitmap.

To emit the frame set this object as the frame source for the DataCaptureContext and turn it on by changing the desired state to FrameSourceState.ON. This frame source will turn off automatically after the frame is emitted.

fromJson(json)
static @NonNull BitmapFrameSource fromJson(@NonNull String json)

Added in version 6.14.0

Constructs a new BitmapFrameSource from the provided JSON, which should have the format {“image”:”<base64>”}, where <base64> is the Base64 encoding of a ARGB_8888 bitmap.

of(bitmap)
static @NonNull BitmapFrameSource of(Bitmap bitmap)

Added in version 6.3.0

Constructs a new BitmapFrameSource from the provided Bitmap. This Bitmap is required to have config ARGB_8888.

desiredState
FrameSourceState getDesiredState()

Added in version 6.3.0

Implemented from FrameSource. See FrameSource.desiredState.

currentState
FrameSourceState getCurrentState()

Added in version 6.3.0

Implemented from FrameSource. See FrameSource.currentState.

addListener(listener)
void addListener(@Nullable FrameSourceListener listener)

Added in version 6.3.0

Implemented from FrameSource. See FrameSource.addListener().

removeListener(listener)
void removeListener(@Nullable FrameSourceListener listener)

Added in version 6.3.0

Implemented from FrameSource. See FrameSource.removeListener().

switchToDesiredState(desiredState, whenDone)
void switchToDesiredState(FrameSourceState desiredState,
        Callback<@NonNull Boolean> whenDone)

Added in version 6.3.0

Implemented from FrameSource. See FrameSource.switchToDesiredState().