Kaspi
Kaspi

Reputation: 3678

MoSync: open a link in a default webbrowser

I am building an HTML5 app with MoSync and I would like to open a URL in the device's default webbrowser from the JavaScript. Could you please paste some example code how could this be done?

Thanks!

Upvotes: 0

Views: 716

Answers (1)

Mikael Kindborg
Mikael Kindborg

Reputation: 247

Right now you need to write some code in C++ to open an external browser. Here is a blog post that describes how to do that: http://www.mosync.com/blog/2013/01/how-extend-javascript-custom-c-code-opening-google-maps-hybrid-app

In the upcoming MoSync SDK 3.2.1 and MoSync Reload 1.0, this functionality will be available directly from JavaScript by calling:

mosync.app.openExternalURL("http://yourpage.com");

Upvotes: 1

Related Questions