问题描述
在小米红米 Note 9 Pro 上,我们尝试使用以下代码打开指纹注册:
val intent = Intent(Settings.ACTION_FINGERPRINT_ENROLL)
startActivityForResult(intent,SETTINGS_FINGERPRINT_ENROLLMENT_REQUESTCODE)
这导致以下异常
java.lang.RuntimeException:
Unable to start activity ComponentInfo{com.android.settings/com.android.settings.biometrics.fingerprint.FingerprintEnrollintroduction}:
java.lang.IllegalStateException:
You need to use a miui theme (or descendant) with this activity.
我们在 try/catch
中调用代码,但它仍然使我们最重要的 Activity 崩溃。
我是否被迫在我的应用程序中使用 miui 主题来启动指纹注册? 无法将我们的应用主题更改为 miui 主题来解决此问题。
是否有小米推出的特殊意图动作或其他实现指纹登记的方式?
使用Intent(Settings.ACTION_Security_SETTINGS)
打开安全设置并不能解决问题,因为似乎没有添加指纹的选项
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)