Opens the passed URL in the default web browser. It only supports http(s) and fin(s) protocols by default. In order to use other custom protocols, they have to be enabled in permission system. File protocol and file path are not supported.
Example
fin.desktop.System.openUrlWithBrowser("https://developer.openf.in/", function () {
console.log("successful");
},function (err) {
console.log("failure: " + err);
});
Example of permission definitions to enable non-default protocols
Note: permission definition should be specified in an app manifest file if there is no DOS settings.Otherwise it has to be specified in both DOS and app manifest files.
"permissions": {
"System": {
"openUrlWithBrowser": {
"enabled": true,
"protocols": [ "msteams", "slack"]
}
}
}