智能客服
你问我答,随时在线为你解决问题
此版本文档已归档不再维护,推荐您使用最新版本。
| CLASS info |
| public class FaceManager extends java.lang.Object |
| FIDO BioAuthn 3D面容认证API的主入口 |
| Method name |
FaceManager(android.content.Context context) 构造一个用户可用于3D面容认证的FaceManager对象,这个对象用于调用 FIDO BioAuthn 3D面容认证API。 |
| Return type | Method name |
| int | canAuth() 确定是否可以使用3D面容认证,包括检测操作系统版本是否支持,硬件是否支持,3D面容认证模板是否已注册 |
| void | auth(final CryptoObject crypto, final android.os.CancellationSignal cancel, final int flags, final BioAuthnCallback callback, final android.os.Handler handler) 发起一次对当前设备的3D面容认证请求 |
| boolean | 确定3D面容认证硬件是否存在并正常工作 |
| boolean | 确定系统是否至少注册了一张3D面容认证模板 |
| Constant |
| public static final int FACE_SUCCESS |
canAuth 接口的返回值值: 0 3D面容认证可用。 |
| Constant |
| public static final int FACE_ERROR_HW_UNAVAILABLE |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回;canAuth 接口的返回值值: 1 硬件不可用,稍后再试。 |
| Constant |
| public static final int FACE_ERROR_UNABLE_TO_PROCESS |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 2 传感器无法处理当前图像。 |
| Constant |
| public static final int FACE_ERROR_TIMEOUT |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 3 超时。 |
| Constant |
| public static final int FACE_ERROR_NO_SPACE |
值: 4 注册时没有足够的存储空间。 |
| Constant |
| public static final int FACE_ERROR_CANCELED |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 5 由于3D面容认证传感器不可用,操作被取消。 |
| Constant |
| public static final int FACE_ERROR_UNABLE_TO_REMOVE |
值: 6 删除3D面容数据失败。 |
| Constant |
| public static final int FACE_ERROR_LOCKOUT |
| 调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 7解锁次数超过次数限制 |
| Constant |
| public static final int FACE_ERROR_VENDOR |
值: 8 可扩展。 |
| Constant |
| public static final int FACE_ERROR_LOCKOUT_PERMANENT |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 9 3D面容认证被禁用。 |
| Constant |
| public static final int FACE_ERROR_USER_CANCELED |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 10 用户取消了操作。 |
| Constant |
| public static final int FACE_ERROR_NOT_ENROLLED |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回;canAuth 接口的返回值值: 11 认证之前3D面容认证模板未注册。 |
| Constant |
| public static final int FACE_ERROR_HW_NOT_PRESENT |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 12 设备没有3D面容传感器。 |
| Constant |
| public static final int FACE_ERROR_VENDOR_BASE |
值: 1000 可扩展的基数。 |
| Constant |
| public static final int FACE_ERROR_SYS_INTEGRITY_FAILED |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 1001 系统完整性检查失败,比如root设备,或 完整性破坏。 |
| Constant |
| public static final int FACE_ERROR_HMS_FRAMEWORK_ERROR |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 1003 华为移动服务框架错误。 |
| Constant |
| public static final int FACE_ERROR_VENDOR:1012 |
调用auth接口时通过回调对象BioAuthnCallback的onAuthError方法的errorCode参数返回值: 1012 相机权限被禁止。 |
| Constant |
| public static final int FACE_ACQUIRED_GOOD |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 0 获得的图像很好。 |
| Constant |
| public static final int FACE_ACQUIRED_INSUFFICIENT |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 1 当前检测到的情况,面容图像不足以处理 |
| Constant |
| public static final int FACE_ACQUIRED_TOO_BRIGHT |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 2 光线太强,获取的图像太亮 |
| Constant |
| public static final int FACE_ACQUIRED_TOO_DARK |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 3 光线太暗,获取的图像太暗 |
| Constant |
| public static final int FACE_ACQUIRED_TOO_CLOSE |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 4 面容太近了。 |
| Constant |
| public static final int FACE_ACQUIRED_TOO_FAR |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 5 面容太远了。 |
| Constant |
| public static final int FACE_ACQUIRED_TOO_HIGH |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 6 手机太高,仅获取到的面容上部。 |
| Constant |
| public static final int FACE_ACQUIRED_TOO_LOW |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 7 手机太低,仅获取到的面容下部。 |
| Constant |
| public static final int FACE_ACQUIRED_TOO_RIGHT |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 8 手机太靠右,仅获取到的面容右部。 |
| Constant |
| public static final int FACE_ACQUIRED_TOO_LEFT |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 9 手机太靠左,仅获取到的面容左部。 |
| Constant |
| public static final int FACE_ACQUIRED_TOO_MUCH_MOTION |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 10 在图像采集过程中,用户的面容移动过多。 |
| Constant |
| public static final int FACE_ACQUIRED_POOR_GAZE |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 11 用户的注视偏离传感器太远,导致用户面容的重要部分被隐藏。 |
| Constant |
| public static final int FACE_ACQUIRED_NOT_DETECTED |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 12 传感器前面未检测到面容。 |
| Constant |
| public static final int FACE_ACQUIRED_VENDOR |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 13 可扩展。 |
| Constant |
| public static final int FACE_ACQUIRED_VENDOR:1038 |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 1038 检测到3D面容。 |
| Constant |
| public static final int FACE_ACQUIRED_VENDOR:1012 |
调用auth接口时通过回调对象BioAuthnCallback的onAuthHelp方法的helpCode参数返回值: 1012 面容不匹配。 |
| Method |
| public FaceManager(android.content.Context context) |
| 构造一个用户可用于3D面容认证的FaceManager对象,这个对象用于调用 FIDO BioAuthn 3D面容认证API。 |
Parameters
| Parameter name | Parameter desc |
| context | 安卓应用的 Context。 |
| Method |
| public int canAuth() |
| 确定是否可以使用3D面容认证,包括检测操作系统版本是否支持,硬件是否支持,3D面容认证模板是否已注册。 |
Return
| type | desc |
| int | FACE_SUCCESS 如果当前可以使用3D面容认证(已注册且可用)。 FACE_ERROR_NOT_ENROLLED 如果认证之前3D面容认证模板未注册。 FACE_ERROR_HW_UNAVAILABLE 如果设备硬件不支持,没有3D结构光。 FACE_ERROR_UNSUPPORTED_OS_VER 如果操作系统版本不支持3D面容认证。 |
| Method |
| public void auth(final CryptoObject crypto, final android.os.CancellationSignal cancel, final int flags, final BioAuthnCallback callback, final android.os.Handler handler) |
| 发起一次对当前设备的3D面容认证请求 |
Parameters
| Parameter name | Parameter desc |
| crypto | 跟本次认证相关联的密码学对象,可以为null。 |
| cancel | 用于取消本次认证的取消信号对象,可以为null。 |
| flags | 认证标记,应该为0。 |
| callback | 认证结果回调对象,不可以为null。 |
| handler | 认证相关消息处理器对象,可以为null。 |
| Method |
| public boolean isHardwareDetected() |
| 确定3D面容认证硬件是否存在并正常工作。 |
Return
| type | desc |
| boolean | 是:true, 否:false。 |
| Method |
| public boolean hasEnrolledTemplates() |
| 确定系统是否至少注册了一张3D面容认证模板。 |
Return
| type | desc |
| boolean | 是:true, 否:false。 |