Android Question contains question

Douglas Farias

Expert
Licensed User
Longtime User
hi

how i make to see my result have "http" or "www" open my function?

exemple

B4X:
Sub sc_result(atype As String,Values As String)
Dim p As PhoneIntents

    ImageView1.Bitmap = qr.QR_Encode(Values,100dip)

    If Values contain "http://" or "www" THEN
  msgbox("IS URL", "IS URL")
  else if Values contain "ONLY NUMBERS" THEN
msgbox("IS NUMBER", "IS NUMBER")
  else
  msgbox("IS TEXT", "IS TEXT")
End Sub

what the correct function to contain?
 

mangojack

Expert
Licensed User
Longtime User
B4X:
 If Values.Contains ("http://") OR Values.Contains ("www") Then
       Msgbox("IS URL", "IS URL")
     Else If IsNumber(Values)Then
     Msgbox("IS NUMBER", "IS NUMBER")
     Else
       Msgbox("IS TEXT", "IS TEXT")
   End If
 
Upvote 0
Top