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