Opening link in mobile browser (SOLVED)

Hi, guys,

I’m wondering if there is any way to open a link (url) in mobile browser, i.e. in Safari on iPhone.

I know, that I can do it in a webview, but there is a bunch of problems with a webview:

  • It shows a blank screen on iPhone, instead of showing a website content (though, works fine on Android).
  • There is no way for the user to close webview and go back to the game.

I assume, it should be possible to open a link in a browser, using inter-app communication functionality, but there is no example how to use it (and it’s completely unclear from the documentation page).

So, I would really appreciate if you help me with some advice or example.

Cheers,
Yuliya

1 Like

Hi!

I think you should be able to use sys.open_url() to open an URL and launch the default browser on the device.

3 Likes

I’ve missed this option. Thanks a lot, works like a charm!

Maybe there is also some option to open default mail app with a blank e-mail? You know, when the user clicks on e-mail address?

1 Like

Could you try something like this;

sys.open_url("mailto:example@example.com")
5 Likes

Thank you so much, it works perfect.

Have a nice day!

3 Likes