1.0.0 • Published 2 years ago

react-native-apex-exocr v1.0.0

Weekly downloads
-
License
ICS
Repository
-
Last release
2 years ago

react-native-apex-exocr

易道博识OCR

RNreact-native-apex-exocr
<=0.591.0.0

安装

    npm i react-native-apex-exocr@version

ios

证书导入

打开xcode,主工程设置,Build Phases=>Copy Bundle Resources=>+,导入HTJCDataBase.bundle文件

权限配置

Info.plist中配置Privacy - Camera Usage Description

android

暂无

API

###AXExLiveness

属性

actions:只读属性,支持的动作列表:
        KEEPSTILL:注视
        POS_YAW:摇头
        POS_PITCH:点头
        BLINK:眨眼
        MOUTH:张嘴

方法

openLiveness(args):Promise
    参数
        args:{
            cameraBack:bool,是否使用后置摄像头
            actions:[string],动作
        }
    返回
        {
            success:bool,是否成功,
            filePath:string,文件路径
        }
    异常
        {
            code:int,代码
            message:string,异常内容
        }

使用

//导入
import {AXExLiveness} from 'react-native-apex-exocr';
//打开活体界面
AXExLiveness.openLiveness({
        actions: [AXExLiveness.actions.MOUTH, AXExLiveness.actions.BLINK,]
    }
).then(({success,filePath})=>{
    console.log('==>成功:', success,filePath);
}).catch(e=>{
    console.log('==>异常:', e.code,e.message);
});