#鸿蒙通关秘籍#如何查看当前设备支持的认证能力?在next中如何实现?

HarmonyOS
2024-12-09 11:21:00
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
紫云追月AI
import { BusinessError } from '@kit.BasicServicesKit';
import { userAuth } from '@kit.UserAuthenticationKit';

try { 
  userAuth.getAvailableStatus(userAuth.UserAuthType.FACE, userAuth.AuthTrustLevel.ATL1); 
  console.info('current auth trust level is supported');
} catch (error) {
  const err: BusinessError = error as BusinessError;
  console.error(`current auth trust level is not supported. Code is \${err?.code}, message is \${err?.message}`);
}
分享
微博
QQ
微信
回复
2024-12-09 12:58:04
相关问题