public class ScannerValidator extends java.lang.Object implements QrCodeDetectionThread.QrCodeDetectionListener, CameraViewPresenter
| Modifier and Type | Class and Description |
|---|---|
static interface |
ScannerValidator.ScannerCoreListener |
| Modifier and Type | Field and Description |
|---|---|
static int |
CAMERA_BUFFERS_REQUIRED |
static int |
IMAGE_ERROR_NO_CODE |
protected static int |
NUM_TIMES_SHOW_SCAN_INSTRUCTIONS |
| Constructor and Description |
|---|
ScannerValidator(ScannerValidator.ScannerCoreListener callback,
android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorStatus() |
void |
initialise(int cameraOrientation,
int pictureWidth,
int pictureHeight)
Sets up internal state which is required when processing picture frames
|
void |
onCameraPreview(byte[] image)
Search for QR code on a frame from the camera.
|
void |
onCodeResults(byte[] frame,
QrCodeResult[] results)
Called when a frame is successfully processed.
|
void |
onFrameDropped(byte[] buffer) |
void |
onHideScanningInstructionsClick() |
void |
onProcessingStarted(boolean trackerReady) |
void |
onViewDestroy() |
void |
onViewPause() |
void |
onViewResume() |
protected static final int NUM_TIMES_SHOW_SCAN_INSTRUCTIONS
public static final int IMAGE_ERROR_NO_CODE
public static final int CAMERA_BUFFERS_REQUIRED
public ScannerValidator(ScannerValidator.ScannerCoreListener callback, android.content.Context context)
public void initialise(int cameraOrientation,
int pictureWidth,
int pictureHeight)
cameraOrientation - display orientation of the camera, as returned by android.hardware.Camera.CameraInfo#orientationpictureWidth - picture width of images sent to #processFrameArpictureWidth - picture height of images sent to #processFrameArpublic void onHideScanningInstructionsClick()
public void onCameraPreview(byte[] image)
onCameraPreview in interface CameraViewPresenterimage - YUV byte array, of size previously sent in #initialisepublic int getErrorStatus()
public void onViewDestroy()
onViewDestroy in interface CameraViewPresenterpublic void onViewResume()
onViewResume in interface CameraViewPresenterpublic void onViewPause()
onViewPause in interface CameraViewPresenterpublic void onCodeResults(byte[] frame,
QrCodeResult[] results)
QrCodeDetectionThread.QrCodeDetectionListeneronCodeResults in interface QrCodeDetectionThread.QrCodeDetectionListenerframe - Analysed frame dataresults - Detection resultspublic void onFrameDropped(byte[] buffer)
onFrameDropped in interface com.yoti.mobile.android.camera.AbstractDetectionThread.OnDetectionListenerpublic void onProcessingStarted(boolean trackerReady)
onProcessingStarted in interface com.yoti.mobile.android.camera.AbstractDetectionThread.OnDetectionListener