# FingerDemo **Repository Path**: madaigou/FingerDemo ## Basic Information - **Project Name**: FingerDemo - **Description**: 指纹识别Demo - **Primary Language**: Kotlin - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2018-06-28 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FingerDemo #### 项目介绍 仿招商银行APP指纹识别弹框 ## 效果图 ![1](screenshot/1.png) ## 验证是否有指纹识别模块 - 权限 `` ```kotlin private fun checkFingerModule(): Boolean { return try { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { (getSystemService(Context.FINGERPRINT_SERVICE) as FingerprintManager).isHardwareDetected } else { false } } catch (e: Exception) { false } } ``` ##监听识别 ```kotlin mFingerListen = object : FingerprintManagerCompat.AuthenticationCallback(){ //识别成功 override fun onAuthenticationSucceeded(){} //识别识别 override fun onAuthenticationFailed() {} //错误次数过多 override fun onAuthenticationError(){} } ```