Biometric authentication has been a part of Android for a few years at this point, but times are changing and so is the way we log into our phones. Face unlock is the next big thing, and Google is urging developers to add support for the “Biometric API” for Android which makes biometrics better for everyone.
In a blog post targeted at developers, Google explains why it shifted over to this new API as well as detailing how developers can shift over to it.
Back in Android Marshmallow, Google introduced support for fingerprint sensors with the “FingerprintManager” class, but it was a very basic solution. Developers had to create their own UI for fingerprints and it only supported fingerprints. Things started changing in Android Pie when “BiometricPrompt” was added. It delivered a common design that developers could use which also worked across more types of biometric authentication.
Now, with Android 10, Google is making further changes with the “Biometric API.” The company explains:
With the launch of Android 10 (API level 29), developers can now use the Biometric API, part of the AndroidX Biometric Library, for all their on-device user authentication needs.
…in Android 10, the team introduced some pivotal features to turn the biometric API into a one-stop-shop for in-app user authentication.
BiometricManagerenables developers to check whether a device supports biometric authentication. Furthermore, the
setDeviceCredentialAllowed()method was added to allow developers the option to use a device’s PIN/pattern/password instead of biometric credentials, if it makes sense for their app.
The team has now packaged every biometric feature you get in Android 10 into the
androidx.biometricGradle dependency so that a single, consistent, interface is available all the way back to Android 6.0 (API level 23).
Going forward, Google wants all apps to be using this new API and it’s also heavily relying on their updates for its new phone. The Pixel 4’s new face unlock system actually requires apps to support these new APIs, so clearly there’s a reason for Google to push faster adoption. However, Google isn’t forcing developers into the new biometric library. Those who do upgrade, though, will be able to have a consistent interface that works all the way back to Marshmallow.
If you’re a developer looking to support these new APIs, Google’s blog post offers more details on how to implement it.
More on Android:
- Pixel 4’s face unlock feature is only supported by 5 Android apps so far
- Verizon, AT&T, Sprint, and T-Mobile join forces to bring RCS to Android in 2020
- Google releases new digital wellbeing apps for Android
FTC: We use income earning auto affiliate links. More.