Android Question No virtual method verifyPhoneNumber

tariqyounis

Member
Licensed User
Longtime User
I have been using the sample ManualPhoneLoginTest a month ago but now when I am trying to use it I got an error:
java.lang.NoSuchMethodError: No virtual method verifyPhoneNumber(Ljava/lang/String;JLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/Executor;Lcom/google/firebase/auth/PhoneAuthProvider$OnVerificationStateChangedCallbacks;)V in class Lcom/google/firebase/auth/PhoneAuthProvider; or its super classes (declaration of 'com.google.firebase.auth.PhoneAuthProvider' appears in /data/app/com.hyperion.manualTest-2/base.apk)
.
Any advice?
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

tariqyounis

Member
Licensed User
Longtime User
Which example is it exacly? I do not know it
the demo is from this link
 
Upvote 0

tariqyounis

Member
Licensed User
Longtime User
this is my problem, I don't recall that I have changed anything. I have reinstalled every thing also, but not luck
 
Upvote 0

tariqyounis

Member
Licensed User
Longtime User
the program crashes on this line# 27 , maybe it would help

authphone:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Private auth As FirebaseAuth
    Dim gb_phoneVerificationSuccess As Boolean
    Dim gs_verificationID, gs_phoneNumber As String
    Private auth As FirebaseAuth
    Private authphone As FirebaseAuthPhoneWrapper
'    Private authemail As FirebaseAuthEmailWrapper
    Type DBCommand (Name As String, Parameters() As Object)
    Type DBResult (Tag As Object, Columns As Map, Rows As List)
End Sub

Sub Activity_Create(FirstTime As Boolean)
        rp.CheckAndRequest(rp.PERMISSION_READ_PHONE_STATE)
        Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
        If Result = False Then
            MsgboxAsync("Phone access permission not allowed!", "Alert...")
            ExitApplication
        End If
        authphone.Initialize("authphone")
        Dim ls_phoneNumber As String = getPhoneNumber
        If ls_phoneNumber <> "" Then gs_phoneNumber = ls_phoneNumber
        If gs_phoneNumber = ""  Or ls_phoneNumber = "Unknown" Then
            setPhoneNumber
        Else
            authphone.startPhoneNumberVerification(gs_phoneNumber)
        End If
        ' If phone number already validated triggers "authphone_phonesignedin" event
        ' otherwise if auto-verification, triggers "authphone_phonesignedin" event after sms is received.
        ' If auto-verification is not supported it must be manually inserted in phonelogin layout.
End Sub
 
Upvote 0

Edwin Tenesaca Gomez

Member
Licensed User
Longtime User
the program crashes on this line# 27 , maybe it would help

authphone:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Private auth As FirebaseAuth
    Dim gb_phoneVerificationSuccess As Boolean
    Dim gs_verificationID, gs_phoneNumber As String
    Private auth As FirebaseAuth
    Private authphone As FirebaseAuthPhoneWrapper
'    Private authemail As FirebaseAuthEmailWrapper
    Type DBCommand (Name As String, Parameters() As Object)
    Type DBResult (Tag As Object, Columns As Map, Rows As List)
End Sub

Sub Activity_Create(FirstTime As Boolean)
        rp.CheckAndRequest(rp.PERMISSION_READ_PHONE_STATE)
        Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
        If Result = False Then
            MsgboxAsync("Phone access permission not allowed!", "Alert...")
            ExitApplication
        End If
        authphone.Initialize("authphone")
        Dim ls_phoneNumber As String = getPhoneNumber
        If ls_phoneNumber <> "" Then gs_phoneNumber = ls_phoneNumber
        If gs_phoneNumber = ""  Or ls_phoneNumber = "Unknown" Then
            setPhoneNumber
        Else
            authphone.startPhoneNumberVerification(gs_phoneNumber)
        End If
        ' If phone number already validated triggers "authphone_phonesignedin" event
        ' otherwise if auto-verification, triggers "authphone_phonesignedin" event after sms is received.
        ' If auto-verification is not supported it must be manually inserted in phonelogin layout.
End Sub

Hello @tariqyounis,

Apparently it's the same problem, check this Link: https://www.b4x.com/android/forum/threads/firebase-phone-number-authentication.114218/post-815801
 
Upvote 0
Top