openExternalBrowser
Description
Opens a URL in the device's external browser. It first checks with canLaunchUrl whether the URL can be launched, and throws an Exception if it cannot.
Parameters
| Parameter | Type | Description |
|---|---|---|
| url | String | The URL to open |
Returns
void
Notes
- A URL that cannot be launched throws an exception. (
openUrlfails silently instead, with no exception.)
Example
// Open a website in the external browser
$app.openExternalBrowser("https://example.com");
Related
$app.openUrl(url)— The version that does not throw on failure$app.canLaunchApp(urlScheme, callback)— Check whether a launch is possible