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)
fun ImageFrameSource.fromJson(json: String): BitmapFrameSource?
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)
fun ImageFrameSource.of(bitmap: Bitmap): BitmapFrameSource
Added in version 6.3.0
Constructs a new BitmapFrameSource from the provided Bitmap. This Bitmap is required to have config ARGB_8888.
- desiredState
val desiredState: FrameSourceState
Added in version 6.3.0
Implemented from FrameSource. See FrameSource.desiredState.
- currentState
val currentState: FrameSourceState
Added in version 6.3.0
Implemented from FrameSource. See FrameSource.currentState.
- addListener(listener)
fun addListener(listener: FrameSourceListener)
Added in version 6.3.0
Implemented from FrameSource. See FrameSource.addListener().
- removeListener(listener)
fun removeListener(listener: FrameSourceListener)
Added in version 6.3.0
Implemented from FrameSource. See FrameSource.removeListener().
- switchToDesiredState(desiredState, whenDone)
fun switchToDesiredState(desiredState: FrameSourceState, whenDone: Callback<Boolean>?)
Added in version 6.3.0
Implemented from FrameSource. See FrameSource.switchToDesiredState().