4

I am implementing the BiometricPrompt API and running into undesirable behavior on Samsung Galaxy S10e with OS 10.

The BiometricPrompt dialog displays over a black screen rather than having my Login page in the background. If I tap the Overview (square) button on my device, I can briefly see that it exists in its own window, whereas in my testing on a Pixel device, the dialog exists in the same window as my app. I observed the issue with both version 1.0.0 and version 1.1.0 of this API.

Fragment onCreate():

biometricPrompt = new BiometricPrompt(
    this,
    ContextCompat.getMainExecutor(requireContext()),
    createBiometricAuthenticationCallback()
);

onClick():

biometricPrompt.authenticate(new BiometricPrompt.PromptInfo.Builder()
    .setTitle([...])
    .setSubtitle([...])
    .setDescription([...])
    .setAllowedAuthenticators(BIOMETRIC_WEAK | DEVICE_CREDENTIAL)
    .build());

I tried using the FragmentActivity instead of the Fragment to initialize it and that doesn’t affect it. It works properly if I launch an intent created with KeyguardManager instead of using BiometricPrompt, but this is deprecated so doesn’t seem to be an ideal long-term solution.

Austin
  • 41
  • 2

0 Answers0