[英]No Activity found to handle Intent { act=android.settings.BIOMETRIC_ENROLL (has extras) }
I am implementing fingerprint authentication on my app.我正在我的应用程序上实施指纹认证。 If the user hasn't set up a fingerprint on his device.如果用户没有在他的设备上设置指纹。 I am trying to open system settings for enrolling fingerprints.我正在尝试打开用于注册指纹的系统设置。 According to documentation( https://developer.android.com/training/sign-in/biometric-auth ), this is the code for opening the setting activity for enrolling fingerprint.根据文档( https://developer.android.com/training/sign-in/biometric-auth ),这是打开注册指纹设置活动的代码。
final Intent enrollIntent = new Intent(Settings.ACTION_BIOMETRIC_ENROLL);
enrollIntent.putExtra(Settings.EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED,
BIOMETRIC_STRONG | DEVICE_CREDENTIAL);
startActivityForResult(enrollIntent, REQUEST_CODE);
I have tested the app on two devices.我已经在两台设备上测试了该应用程序。 In Samsung, the code is working.在三星,代码正在运行。 But in an Asus device, it is not working.但在华硕设备中,它不起作用。
As in the Google documentation "ACTION_BIOMETRIC_ENROLL" added at API 30, that's what causes your app to crash正如在 API 30 添加的 Google 文档“ACTION_BIOMETRIC_ENROLL”中一样,这就是导致您的应用崩溃的原因
Make sure that you have added a fingerprint in device it will work (in sha'a Allah)确保您在设备中添加了指纹,它将起作用(在 sha'a Allah 中)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.