com.pax.dal
Interface IOCR
-
public interface IOCR
OCR模块。OCR module.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static interfaceIOCR.IOCRListener扫描结果回调。Callback of scan results.
-
Field Summary
Fields Modifier and Type Field and Description static intTYPE_CHINA_IDCARD中国身份证(暂不支持)。Chinese identity card (not currently supported).static intTYPE_MRZ机读码。Machine Readable Zone.static intTYPE_MRZ_EX通用机读码。Universal Machine Readable Zonestatic intTYPE_PASSPORT护照(暂不支持)。Passport (not currently supported).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidclose()关闭OCR。Close the OCR.voidopen()打开OCR。Open the OCR.voidsetAuthId(java.lang.String authId)设置授权认证ID。Set the authorization ID.voidsetPreviewParam(android.os.Bundle param)设置预览配置。在open()之后和startPreview(int, int, IOCRListener)之前调用。Set the preview configuration.Called afteropen()and beforestartPreview(int, int, IOCRListener).voidstartPreview(int type, int timeout, IOCR.IOCRListener listener)打开预览界面进行扫描。Open the preview screen for scanning.voidstopPreview()关闭扫描预览界面。Close the scan preview screen.
-
-
-
Field Detail
-
TYPE_MRZ
static final int TYPE_MRZ
机读码。Machine Readable Zone.- Since:
- V3.16.00
- See Also:
- Constant Field Values
-
TYPE_PASSPORT
static final int TYPE_PASSPORT
护照(暂不支持)。Passport (not currently supported).- Since:
- V3.16.00
- See Also:
- Constant Field Values
-
TYPE_CHINA_IDCARD
static final int TYPE_CHINA_IDCARD
中国身份证(暂不支持)。Chinese identity card (not currently supported).- Since:
- V3.16.00
- See Also:
- Constant Field Values
-
TYPE_MRZ_EX
static final int TYPE_MRZ_EX
通用机读码。Universal Machine Readable Zone- Since:
- V3.30.00
- See Also:
- Constant Field Values
-
-
Method Detail
-
setAuthId
void setAuthId(java.lang.String authId) throws OCRException
设置授权认证ID。Set the authorization ID.- Parameters:
authId-授权认证ID。Authorization ID.- Throws:
OCRException- Since:
- V3.16.00
-
open
void open() throws OCRException
打开OCR。Open the OCR.- Throws:
OCRException- Since:
- V3.16.00
-
setPreviewParam
void setPreviewParam(android.os.Bundle param) throws OCRException
设置预览配置。在open()之后和startPreview(int, int, IOCRListener)之前调用。Set the preview configuration.Called afteropen()and beforestartPreview(int, int, IOCRListener).- Parameters:
param-KEY名称 类型 说明 cameraId int 摄像头ID(默认后置) 0:后置摄像头 1:前置摄像头 isFlashOn boolean 是否开启闪光灯(默认不开启) true:开启 false:不开启 isAutoFocus boolean 是否开启自动对焦(默认不开启) true:开启 false:不开启 The KEY name Type Instructions cameraId int Camera ID(default rear). 0: rear camera 1: front camera isFlashOn boolean Whether to turn on the flash (not on by default).true:open, false:not open isAutoFocus boolean Whether to turn on autofocus (not on by default).true:open, false:not open - Throws:
OCRException- Since:
- V3.16.00
-
startPreview
void startPreview(int type, int timeout, IOCR.IOCRListener listener) throws OCRException
打开预览界面进行扫描。Open the preview screen for scanning.- Parameters:
timeout-超时时间。单位:毫秒。Timeout time. Unit: ms.type-Type of certificate.listener-扫描结果回调。IOCR.IOCRListenerCallback of scan results.IOCR.IOCRListener- Throws:
OCRException- Since:
- V3.16.00
-
stopPreview
void stopPreview() throws OCRException
关闭扫描预览界面。Close the scan preview screen.- Throws:
OCRException- Since:
- V3.16.00
-
close
void close() throws OCRException
关闭OCR。Close the OCR.- Throws:
OCRException- Since:
- V3.16.00
-
-