Android 10 Enables Single Biometric API For All Devices

You can now use the Biometric API for all your on-device user authentication wants.

Recently, Google shared that with Android 10, you can now use the Biometric API for all your on-device user authentication needs. Biometric API is a part of the AndroidX Biometric Library.
 
According to Google, the company has added a bunch of significant features to the AndroidX Biometric Library. This makes all of the biometric behavior from Android 10 available to all devices that run Android 6.0 or higher.
 
Apart from supporting multiple biometric authentication form factors, the API also makes it easier to check whether a given device has biometric sensors. In case there are no biometric sensors present, the API enables developers to specify whether they want to use device credentials in their apps.
  1. val biometricManager = BiometricManager.from(context)  
  2. if (biometricManager.canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS){  
  3. // TODO: show in-app settings, make authentication calls.  
  4. }  
Also, the framework now provides a friendly, standardized API for OEMs to integrate support for all types of biometric sensors on their devices. The framework has built-in support for facial authentication in Android 10. Vendors don’t require to do a custom implementation.
 
To learn more, how it works, you can visit the official announcement here.