I am working with Samsung tab Iris scan feature. My requirement is, if current device is supports Iris hardware, then I will go through Iris scan else will use normal way in the application.
So, any one can tell me, how to check device compatibility for Iris Scan hardware in android.
Thanks in advance.
I was able to check if my Samsung device was capable of Samsung Face or Samsung Iris by checking for the presence of the following packages on the device using the Android
PackageManager
class:com.samsung.android.bio.face.service
orcom.samsung.android.server.iris
Example usage:
For face:
For iris:
An exception is thrown if the package and feature is not present on the device.
Two caveats:
This does not guarantee the biometrics is actually setup and in use. It only displays the presence of the feature. The
BiometricManager
class could be used in conjunction to confirm enrollment.There does not appear to be a way to pick and choose from within an app which biometric methods are used. There is the deprecated
FingerprintManager
functionality that can get fingerprint verification or the newBiometricPrompt
features but the biometric authentication presents the OS level prompt which is determined by the biometric auth preferences the user chose in the settings app. If multiple biometric authentication methods are setup this can show as a choice to the user, but it is in the OS dialog outside of the control of your app.