@Deprecated public class BarcodeDetectorFrameHandler extends java.lang.Object implements PreviewBuffer.FrameHandler
BarcodeDetectorFrameHandler.ResultHandler
(addResultHandler(ResultHandler)).
Preview frame considered intercepted if at least one
BarcodeDetectorFrameHandler.ResultHandler returns true from
BarcodeDetectorFrameHandler.ResultHandler.handleResult(Result)
PreviewBuffer| Modifier and Type | Class and Description |
|---|---|
static interface |
BarcodeDetectorFrameHandler.ResultHandler
Deprecated.
Continiously notified about barcode/QR code detection results.
|
| Constructor and Description |
|---|
BarcodeDetectorFrameHandler(android.content.Context context,
ScanbotSDK scanbotSDK)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResultHandler(BarcodeDetectorFrameHandler.ResultHandler handler)
Deprecated.
Registers result handler which will be notified about barcode/QR code detection results.
|
static BarcodeDetectorFrameHandler |
attach(ScanbotCameraView cameraView,
ScanbotSDK scanbotSDK)
Deprecated.
Convenience method for creating new
BarcodeDetectorFrameHandler and adding it
as PreviewBuffer.FrameHandler to given camera view. |
boolean |
handleFrame(byte[] frame,
int width,
int height,
int frameOrientation,
android.graphics.Rect finderRect)
Deprecated.
Invoked for every new camera preview frame
|
boolean |
isEnabled()
Deprecated.
|
void |
removeResultHandler(BarcodeDetectorFrameHandler.ResultHandler handler)
Deprecated.
Unregisters handler.
|
void |
setDetectionInterval(long detectionIntervalInMs)
Deprecated.
Set barcode detection interval in milliseconds
|
void |
setEnabled(boolean enabled)
Deprecated.
|
public BarcodeDetectorFrameHandler(android.content.Context context,
ScanbotSDK scanbotSDK)
public static BarcodeDetectorFrameHandler attach(ScanbotCameraView cameraView, ScanbotSDK scanbotSDK)
BarcodeDetectorFrameHandler and adding it
as PreviewBuffer.FrameHandler to given camera view.cameraView - camera view to which new barcode/QR code detector will be attachedBarcodeDetectorFrameHandlerpublic boolean handleFrame(byte[] frame,
int width,
int height,
int frameOrientation,
android.graphics.Rect finderRect)
PreviewBuffer.FrameHandlerhandleFrame in interface PreviewBuffer.FrameHandlerframe - image in NV21 formatwidth - width of the imageheight - height of the imageframeOrientation - orientation of the image (in degrees)finderRect - finder overlay areatrue if frame should be considered as "intercepted", i.e. no further
processing should be performed on it. false to allow other frame handlers to
process this frame.public void addResultHandler(BarcodeDetectorFrameHandler.ResultHandler handler)
Results are coming on the worker thread. Don't forget to move execution to main thread before updating UI.
handler - handler to register. Must not be null. If handler was already
registered, nothing happens.public void removeResultHandler(BarcodeDetectorFrameHandler.ResultHandler handler)
handler - handler to unregister. If it was not registered before, nothing happens.public boolean isEnabled()
true if barcode/QR code detection is enabled. false if barcode/QR code detection
is disabled, i.e. incoming frames are skipped.public void setEnabled(boolean enabled)
enabled - true to enable barcode/QR code detection. false to disable
barcode/QR code detection.public void setDetectionInterval(long detectionIntervalInMs)
detectionIntervalInMs -