iOS Question perform a call from the app? b4i

ilan

Expert
Licensed User
thanx erel, i must tell you i really enjoy b4i, this is a wonderfull tool. i never thought it would be so easy to develop for ios

the only thing i really hate on b4i is that i cannot stand up from my pc :D (i am officially addicted to b4i)
 

Shay

Well-Known Member
Licensed User
How to I put <VAR> string instead of the number you wrote?
is this will work?
If App.CanOpenURL("tel:") Then App.OpenURL("tel:" & Number )
 

ilan

Expert
Licensed User
How to I put <VAR> string instead of the number you wrote?
is this will work?
If App.CanOpenURL("tel:") Then App.OpenURL("tel:" & Number )
Yes it should work, i do it like this:

B4X:
Dim phonenumber As String 
phonenumber = "0505552222"

If App.CanOpenUrl("telprompt:" & phonenumber) = True Then
    App.OpenURL("telprompt:" & phonenumber)
End If
 

Taha

Member
Licensed User
I've got unexpected error: "LaunchServices: ERROR: There is no registered handler for URL scheme (null)". Added this line but without success.
B4X:
#QueriesSchemes: tel
 

Taha

Member
Licensed User
Ok, the issue could be resolved by modifying the above code as follows:
B4X:
Dim phonenumber As String
phonenumber = "telprompt:0505552222"

If App.CanOpenUrl(phonenumber) = True Then
    App.OpenURL(phonenumber)
End If
Also, removed spaces and parenthesis.
 

manolitoGnet

Member
Licensed User
Knows anybody if this error is related to the use of the emulator?

-canOpenURL: failed for URL: "tel:632222222" - error: "This app is not allowed to query for scheme tel"

B4X:
Sub Button1_click
    Private phonenumber As String
   
    phonenumber = "tel:632222222"

    If App.CanOpenUrl(phonenumber) = True Then
           App.OpenURL(phonenumber)
    End If
End Sub
Tx
 

manolitoGnet

Member
Licensed User
Knows anybody if this error is related to the use of the emulator?

-canOpenURL: failed for URL: "tel:632222222" - error: "This app is not allowed to query for scheme tel"

B4X:
Sub Button1_click
    Private phonenumber As String
  
    phonenumber = "tel:632222222"

    If App.CanOpenUrl(phonenumber) = True Then
           App.OpenURL(phonenumber)
    End If
End Sub
Tx
An now: -canOpenURL: failed for URL: "tel:632222222" - error: "(null)"

:(
 

ilan

Expert
Licensed User
Knows anybody if this error is related to the use of the emulator?

-canOpenURL: failed for URL: "tel:632222222" - error: "This app is not allowed to query for scheme tel"

B4X:
Sub Button1_click
    Private phonenumber As String
  
    phonenumber = "tel:632222222"

    If App.CanOpenUrl(phonenumber) = True Then
           App.OpenURL(phonenumber)
    End If
End Sub
Tx
just remove "tel:" from your phone number
 

ilan

Expert
Licensed User
No, this is not the way...

B4X:
-canOpenURL: failed for URL: "632222222" - error: "Invalid input URL"
The protocol is a must.

Tx
have you seen my post above??

this is how i do it:

B4X:
Dim phonenumber As String
phonenumber = "0505552222"

If App.CanOpenUrl("telprompt:" & phonenumber) = True Then
    App.OpenURL("telprompt:" & phonenumber)
End If
 

ilan

Expert
Licensed User
Knows anybody if this error is related to the use of the emulator?
now i see that u r using an emulator. i dont think that phone calls can be performed from an emulator!!
you should try your code on a real phone
 

manolitoGnet

Member
Licensed User
now i see that u r using an emulator. i dont think that phone calls can be performed from an emulator!!
you should try your code on a real phone
Yeah, that is my very first question... I have not an iPhone, only 4 iPad and the Simulator from Xcode.

Thanks for your effort!
 
Top