1

I'm developing an app across Gluon Mobile plugin on JavaFX and I integrated a whatsapp sharing, but when I try to use it on IOS doesn't work, on Android device the list of whatsapp contacts are displayed and the function works correctly. To implement that, after some researches,I added on .plist file this key:

<key>LSApplicationQueriesSchemes</key>
    <array>
          <string>whatsapp</string>

and I used this code to open whatsapp from browser:

String whatsappUrl = "whatsapp://send?text=\\"; service.launchExternalBrowser(whatsappUrl+ myUrl);

where myUrl is the url that I want to join by whatsapp.

Can anyone helps to solve this problem on IOS? Thank you in advance.

Denise
  • 131
  • 10
  • can you use the ABID for whatsapp sharing. – Deepak Saki Jun 15 '17 at 10:23
  • @DeepakSaki can you explain me what is and how I use this ABID?Thank you – Denise Jun 15 '17 at 12:51
  • please find the url https://stackoverflow.com/questions/32788744/open-whatsapp-conversation-using-abid-doesnt-work – Deepak Saki Jun 15 '17 at 13:02
  • @DeepakSaki I don't think is my case, I don't want to open a conversation with a single contact ma simply open the contact list of whatsapp and then chose the contact with share something. – Denise Jun 15 '17 at 13:17
  • So on iOS, using `BrowserService`, works for you? What is it that is not working? – José Pereda Jun 15 '17 at 15:58
  • yes I use browser service, on android works correctly but not for ios despite of I include in the .plist the whatsapp scheme. – Denise Jun 16 '17 at 08:26
  • 1
    Have you checked the iOS logs? With XCode->Devices select your device and run the app. Find out what it prints out when calling the service. – José Pereda Jun 16 '17 at 18:00
  • Jun 19 10:07:08 iPhone-di-Ws-Tech n_lex[1690] : whatsapp://send?text=\134 Jun 19 10:07:08 iPhone-di-Ws-Tech n_lex(UIKit)[1690] : -canOpenURL: failed for URL: "(null)" - error: "Invalid input URL" Jun 19 10:07:08 iPhone-di-Ws-Tech n_lex[1690] : Can't open url whatsapp://send?text=\134http://*MYURL* – Denise Jun 19 '17 at 08:12
  • 1
    Does it work for you when you add a string like `"whatsapp://send?text=Hello%2C%20World!"`? – José Pereda Jun 20 '17 at 08:19
  • no, doesn't work too! Maybe the key on the .plist it's not correct or I have to add something else? this is the error: -canOpenURL: failed for URL: "whatsapp://send?text=Hello%2C%20World!" - error: "The operation couldn\M-b\M^@\M^Yt be completed. (OSStatus error -10814.)" – Denise Jun 21 '17 at 14:27
  • 1
    The error 10814 seems to happen when there is no app to perform the task? See [this](https://stackoverflow.com/a/41139802/3956070) – José Pereda Jun 21 '17 at 16:31
  • Right! I use an iphone for test and I uninistalled whatsapp and the other apps. Sorry for the waste time for this banal problem and thank you so much! – Denise Jun 22 '17 at 08:24
  • anyway with the string hello word works but unfortunatelly not for my url! Maybe I have to encode it? – Denise Jun 22 '17 at 08:43

1 Answers1

0

I solved, the error was in the prefix whatsapp://send?text=\ , I changed it in whatsapp://send?text= and it works.

Denise
  • 131
  • 10