iOS Question Share Simple Text With Whatsapp

tufanv

Expert
Licensed User

tufanv

Expert
Licensed User
I found the solution:

add this:
#QueriesSchemes: whatsapp

B4X:
    Dim txt As String = "Hello%2C%20World!"
Dim url As String = "whatsapp://send?text=" & txt
If App.CanOpenUrl(url) Then App.OpenUrl(url)
my only question is , if whatsapp is not present in the phone , will the app crash or do nothing ?_
 

Filippo

Expert
Licensed User
my only question is , if whatsapp is not present in the phone , will the app crash or do nothing ?_
Probably only the message "whatsapp is not installed".
I also get the message when sending e-mail because I did not configure an e-mail.
 

Erel

Administrator
Staff member
Licensed User
App.CanOpenUrl will return False if whatsapp is not installed.

I think openapp is no longer possible after ios 9.
Not true. The only change is that you need to declare the scheme with #QueriesSchemes.
 
Top