Determine if biometric hardware is present and the user has enrolled biometrics on Android P

前端 未结 8 1253
半阙折子戏
半阙折子戏 2020-12-13 05:50

I\'m asked to show certain UI elements depending on the presence of biometric hardware. For Android 23-27 I use FingerprintManager#isHardwareDetected() and

8条回答
  •  独厮守ぢ
    2020-12-13 06:50

    For those who do not want to wait for support library released, you can use nightly build like this

    repositories {
            maven {
                url "https://ci.android.com/builds/submitted/5795878/androidx_snapshot/latest/repository/"
            }
        }
    
    implementation group: 'androidx.biometric', name: 'biometric', version: '1.0.0-SNAPSHOT'
    

    get build version from here

    https://ci.android.com/builds/branches/aosp-androidx-master-dev/
    

    branch aosp-androidx-master-dev

    show latest build from androidx-snapshot

提交回复
热议问题