Skip to main content

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

ParameterTypeDescription
urlStringThe URL to open

Returns

void

Notes

  • A URL that cannot be launched throws an exception. (openUrl fails silently instead, with no exception.)

Example

// Open a website in the external browser
$app.openExternalBrowser("https://example.com");
  • $app.openUrl(url) — The version that does not throw on failure
  • $app.canLaunchApp(urlScheme, callback) — Check whether a launch is possible