Android compose 支持指纹验证功能
发布时间
阅读量:
阅读量
采用compose技术实现指纹识别验证
点击按钮进行验证
Button(onClick = {
var passed = false
val biometic = BiometricPrompt.Builder(applicationContext)
.setTitle("使用指纹解锁App")
.setSubtitle("证明你是手机的主人")
.setNegativeButton("取消验证", mainExecutor
) { dialog, which -> Log.e(TAG, "onCreate: click negative buttton", ) }
.build()
biometic.authenticate(CancellationSignal(), mainExecutor,
object:AuthenticationCallback(){
override fun onAuthenticationFailed() {
super.onAuthenticationFailed()
Log.d(TAG, "onAut
全部评论 (0)
还没有任何评论哟~
