指纹识别调用系统测试页面
Opened this issue · 0 comments
maoruibin commented
private fun showAuthenticationScreen() {
val intent = mKeyManager!!.createConfirmDeviceCredentialIntent("finger", "测试指纹识别")
if (intent != null) {
startActivityForResult(intent, REQUEST_CODE_CONFIRM_DEVICE_CREDENTIALS)
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
if (requestCode == REQUEST_CODE_CONFIRM_DEVICE_CREDENTIALS) {
// Challenge completed, proceed with using cipher
if (resultCode == Activity.RESULT_OK) {
Toast.makeText(this, "识别成功", Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(this, "识别失败", Toast.LENGTH_SHORT).show()
}
}
}