iOS Question Scheme - bug or me caput!!!

ivanomonti

Expert
Licensed User
Longtime User
Hi community, because it calls "scheme" when you are in debug everything goes ok and when compiling nothing works any more!

B4X:
    If Mod_Global.getDevice = "ipad" Then
       Dim s As String = "skype:" & colRoot.Get(1)
       Mod_Global.CallSkype(s)
     Else
       Dim s As String = "phone:" & colRoot.Get(1)
       Mod_Global.CallPhone(s)
     End If


Sub CallSkype(s As String)
    Dim app As Application
    If app.CanOpenUrl(s) Then app.OpenUrl(s)
End Sub

Sub CallPhone(s As String)
    Dim app As Application
    If app.CanOpenUrl(s) Then app.OpenUrl(s)
End Sub

' ------------------------------------------------------------------------------------

    Dim s As String = "fb://profile/me?text=" & colRoot.Get(3) & " publicato su job2go il "  & colRoot.Get(13)
     CallFacebookPublish(s)

Sub CallFacebookPublish(s As String)
   Dim app As Application
   If app.CanOpenUrl(s) Then app.OpenUrl(s)
End Sub

' ------------------------------------------------------------------------------------

Sub CallSms(s As String)
   Dim app As Application
   If app.CanOpenUrl(s) Then app.OpenUrl(s)
End Sub

' ------------------------------------------------------------------------------------

    If Mod_Global.getDevice = "ipad" Then
       CallMail(ma, mb, mc)
     Else
       Msgbox2("mail","Inviare Sms o Mail","Mesage",Array("sms","mail"))
     End If

Sub mail_Click(value As String)

   If value = "sms" Then
     Dim s As String = "sms:" & ma & mb & mc
     CallSms(s)
   Else
     CallMail(ma, mb, mc)
   End If
   
End Sub

Sub CallMail(mail As String, SetSubject As String, SetBody As String)
   Dim mailc As MailComposer
     mailc.Initialize("mailc")
     mailc.SetToRecipients(Array(mail, "[email protected]"))
     mailc.SetSubject(SetSubject)
     mailc.SetBody(SetBody, False)
     mailc.Show(page1)
End Sub

' ------------------------------------------------------------------------------------

    Dim s As String = "https://maps.google.com/maps?q=" & colRoot.Get("8")
     CallMap(s)

Sub CallMap(s As String)
   Dim app As Application
   If app.CanOpenUrl(s) Then app.OpenUrl(s)
End Sub
 
Top