Built-in front calls / Standard front calls |
Opens an URL with the default URL handler of the front-end.
ui.Interface.frontCall("standard", "launchURL", [ url [, mode ] ], [] )
The "launchURL" front call opens an URL with the default URL handler available on the front-end platform; This is typically the web browser for "HTTP:" URLs, or the mailer for "mailto:" URLs, but the corresponding application may also be dedicated to the type of object specified by the URL (for example, a mapping service or to initiate a phone call).
This front call is a powerful feature: Front-end applications can register themselves as URL handlers, so you can start applications on the front-end through the lauchurl front call.The mode parameter is optional and is interpreted differently according to the front-end type:
To invoke Google Play Store:
CALL ui.Interface.frontCall("standard", "launchURL", ["market://details?id=com.google.android.apps.currents"], [])
CALL ui.Interface.frontCall("standard", "launchURL", ["market://details?id=com.google.zxing.client.android"], [])
To open Google Maps:
CALL ui.Interface.frontCall("standard", "launchURL", ["geo:48.613363,7.711083?z=17"], [])
To open Google Street View:
CALL ui.Interface.frontCall("standard", "launchURL", ["google.streetview:cbll=48.613363,7.711083&cbp=1,0,,0,1.0&mz=17"], [])
To initiate a phone call:
CALL ui.Interface.frontCall("standard", "launchURL", ["tel:+336717623"], [])