基础库 1.5.0 开始支持,低版本需做兼容处理
获取本机支持的 soter 生物认证方式
object参数说明:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
success | function | 否 | 接口调用成功的回调函数 |
fail | function | 否 | 接口调用失败的回调函数 |
complete | function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
success返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
supportmode | stringarray | 该设备支持的可被soter识别的生物识别方式 |
errmsg | string | 接口调用结果 |
supportmode 有效值:
值 | 说明 |
---|---|
fingerprint | 指纹识别 |
facial | 人脸识别(暂未支持) |
speech | 声纹识别(暂未支持) |
示例代码:
wx.checkissupportsoterauthentication({
success(res) {
// res.supportmode = [] 不具备任何被soter支持的生物识别方式
// res.supportmode = ['fingerprint'] 只支持指纹识别
// res.supportmode = ['fingerprint', 'facial'] 支持指纹识别和人脸识别
}
})