Android Question BiometricManager - Biometric Authentication Fails on Asus Zen 4

Nestor Castro Jr

Member
Licensed User
I'm using BiometricManager in my project and most of the equipment I tested works normally. In Asus Zen 4 with Android 8, I get an error message "(IllegalStateException) java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity"

Has anyone here had this problem?
 

Nestor Castro Jr

Member
Licensed User
Hello Erel,

Yes, I tried with your sample. The only change made was this:

B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    Try
        bm.Initialize(Me, "Authenticate")
        Dim res As String = bm.CanAuthenticate
        If res = "SUCCESS" Then
            btnAuth.Enabled = True
        Else
            btnAuth.Enabled = False
            Label1.Text = "Can't authenticate: " & res
        End If
    Catch
        MsgboxAsync(LastException,"Erro")
    End Try
End Sub

Sub btnAuth_Click
    Try
        bm.Show("Please authenticate")
        Wait For Authenticate_Complete (Success As Boolean, ErrorMessage As String)
        Label1.text = $"Success: ${Success}
        ErrorMessage: ${ErrorMessage}"$
    Catch
        MsgboxAsync(LastException,"Erro")
    End Try
End Sub

The result I send in screenshot
 

Attachments

  • WhatsApp Image 2020-08-28 at 10.02.18.jpeg
    WhatsApp Image 2020-08-28 at 10.02.18.jpeg
    32.5 KB · Views: 281
Upvote 0

Nestor Castro Jr

Member
Licensed User
Erel, I do not have this devide in my hands. I received this report from a user and to troubleshooting this issue, I sent the apk from this demo and he sent me back that screenshot, so I can't show you the full error message.
 

Attachments

  • BiometricManager.zip
    34.4 KB · Views: 282
Upvote 0
Top