本文介绍了使用确认凭证api进行人脸解锁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用我的应用中的确认凭证api通过 createConfirmDeviceCredentialIntent api.

I am using confirm credentials api in my app to authenticate user, using createConfirmDeviceCredentialIntent api.

当我将设备锁设置为大头针/图案/密码或指纹时,api可以正常工作.但是,在面部解锁的情况下它不起作用.我已经在设备中设置了面部解锁,并且在打开设备时可以正常工作.但是,当我使用上述api启动意图时,它并不是在识别面部解锁,而是在识别所有其他内容.

The api is working fine when I have set up my device lock as pin/pattern/password or fingerprint. But, it's not working in the case of face unlock. I've set face unlock in my device and it's working fine when opening the device. But when I launch the intent using the above mentioned api, it's not recognizing face unlock but all the other things.

这是此api的限制吗?还是我需要做一些额外的事情来实现这一目标?

Is this a limitation of this api? or I've to do something extra to achieve this?

在任何地方都找不到此内容,因此请在此处发布.

Can't find this anywhere so posting here.

推荐答案

不幸的是,这是不可能的,因为使用脸部解锁是Smart Lock解锁工具集的一部分.

Unfortunately, this isn't possible because unlocking using your face is part of the Smart Lock set of unlock tools.

属于Smart Lock类别的其他解锁方法包括:

Other methods of unlocking that fall under the Smart Lock category include:

  • 人体检测
  • 受信任的地方
  • 受信任的设备
  • 受信任的面孔(有问题的方法)
  • 信任的声音

由于这些都不是Android中原始的安全方法,因此不允许使用API​​访问这些方法.

Because none of these are primitive security methods in Android, it does not make sense to allow these to be accessed using APIs.

如果Smart Lock可以与Keyguard一起使用,则从理论上讲,人体检测将能够授予对应用的访问权限,并且该应用位于受信任的位置(而不是在受信任的人的手中),甚至可以信任的语音被使用.

If Smart Lock could be used with Keyguard, on-body detection would be in theory be able to grant access to an app, being in a trusted place (but not in the hands of a trusted person) and even trusted voice could be used.

Apple和Face ID可以允许这样做,因为Face ID是iPhone X的原始安全方法,因为用于解锁设备的数据以与Touch ID数据相同的方式保存在Secure Enclave中.

Apple and Face ID can allow this because Face ID is a primitive security method for the iPhone X, as the data used to unlock the device is kept in the Secure Enclave, in the same way that Touch ID data is.

我希望这为您提供了充分的理由,说明为什么这是不可能的,以及为什么这是不可能的.

I hope this gives you enough reason as to why this isn't possible, and why it makes sense that this isn't possible.

来源: Keyguard (说明允许使用的解锁方法),智能锁面部ID

Sources:Keyguard (stating unlock methods allowed to be used), Smart Lock, Face ID

这篇关于使用确认凭证api进行人脸解锁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 20:59