Dim input As B4XInputTemplate
dialog.Initialize(Activity)
dialog.Title = "Lead Guru"
Dim IME As IME
IME.Initialize("IME")
input.Initialize
input.lblTitle.Text = "Enter your phone number:"
input.ConfigureForNumbers(True, True)
'input.RegexPattern = ".+" 'require at least one character
IME.SetLengthFilter(input.TextField1,10)
input.RegexPattern = ("^\d{10}")
Wait For (dialog.ShowTemplate(input, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
LogColor("Pressed Dialog OK", Colors.Magenta)
LogColor(input.Text, Colors.Magenta)
' Starter.DB.ExecNonQuery2("INSERT INTO user",Array As String VALUES(MyTel))
Starter.DB.ExecNonQuery2("INSERT INTO user VALUES(?)", Array As String(input.Text))
LogColor("Inserted OK", Colors.Magenta)
'Firebase
FBtopic = input.Text
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")
End If