0

I wants to get supported Biometric type user can authenticate.

    val biometricManager = BiometricManager.from(this)
when (biometricManager.canAuthenticate()) {
    BiometricManager.BIOMETRIC_SUCCESS -> {
        //In here I needs to get the Biometric Type 
        }
    }
   
  • What do you mean by "supported Biometric type"? – CommonsWare Apr 29 '23 at 14:12
  • @CommonsWare fingerprint or face recognition or irirs – Imesh Madushanka Apr 29 '23 at 17:46
  • @ImeshMadushanka so the answer can be long or short. Short one: Current Biometric API do not have relevant methods for this. Long one: You can use 3rd-party solutions, for example AdvancedBiometricCompat: ```if(BiometricPromptCompat.getAvailableAuthRequests()[0].type == BiometricType.BIOMETRIC_FACE) //do something with face``` The types list is here https://github.com/sergeykomlach/AdvancedBiometricPromptCompat/tree/main#supported-types-of-biometric-authentication – Serhii.Komlach Apr 30 '23 at 17:40

0 Answers0