I am trying to implement Biometric prompt API to authenticate user using fingerprint verification. I am successfully able to integrate Biometric prompt and it is working on andorid 9.0. But as the documentation suggests Biometric api is also backwards compatible, but when I build dialog using below code it shows API support warning.
Call requires API level 28 (current min is 15): new android.hardware.biometrics.BiometricPrompt.Builder less... (Ctrl+F1) This check scans through all the Android API calls in the application and warns about any calls that are not available on all versions targeted by this application (according to its minimum SDK attribute in the manifest)
mBiometricPrompt = new BiometricPrompt.Builder(this)
.setDescription("Description")
.setTitle("Title")
.setSubtitle("Subtitle")
.setNegativeButton("Cancel", getMainExecutor(), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Log.i(TAG, "Cancel button clicked");
}
})
.build();
What can I do to make this work on lower apis? Here is Screenshot.