【问题标题】:does codenameone support android biometrics代号支持安卓生物识别吗
【发布时间】:2020-01-22 22:49:45
【问题描述】:

codenameone 是否支持

  • androidx.biometric.BiometricPrompt
  • android.hardware.biometrics.BiometricPrompt

我尝试在本机的 codeoneproject 中使用这些类,但我从构建服务器收到以下错误: 错误:android.hardware.biometrics 包不存在 错误:包 androidx.biometric 不存在

您有任何支持 BiometricPrompt 的计划吗?

【问题讨论】:

  • 除了 Diamonds 答案之外,您还可以通过包含正确的 google play 标志来查看扩展的源代码如何使本机代码正常工作。

标签: codenameone


【解决方案1】:

您可以使用名为 FingerprintScanner 的现有 Codename One 扩展程序。

在 Codename One Extension Store 中搜索并将其下载到您的项目中。

如下使用:

Fingerprint.scanFingerprint("Prompt message: Approve this process using biometric.", value -> {
    Log.p("Biometric scan is successfull!");
}, (sender, err, errorCode, errorMessage) -> {
    Log.p("Biometric scan failed!");
});

【讨论】:

  • 我知道有一个代号为指纹扫描仪的扩展,但它使用了在 API 级别 28 中已弃用的 android FingerprintMenager 类。改为使用 BiometricPrompt
猜你喜欢
  • 2012-06-18
  • 2019-04-26
  • 1970-01-01
  • 2022-11-18
  • 1970-01-01
  • 2011-05-19
  • 2011-07-07
  • 1970-01-01
相关资源
最近更新 更多