Open a specific URL in the external browser of the hosting OS.
cordova plugin add cordova-plugin-openurlext
OR
cordova plugin add https://github.com/PaoloMessina/OpenUrlExt
This plugin is released under the MIT license
OpenUrlExt.open(url, onSuccess, onFailure);
Arguments:
- url: The url too open, will be encoded.
- onSuccess: function () {...} Callback for successful scan.
- onFailure: function () {...} Callback for cancelled scan or error.
Return:
- success() Successful opening
- error() Error on opening
Example:
```javascript
{
OpenUrlExt.open(urlString,
function(){
console.log("ok");
},
function(){
console.log("ko");
});
}
```
- Android: The plugin is not native but a simple call to javascript that just working well.
- iOS: The plugin calls success() when URL or app is opened, and error() in the following cases:
- URL is blank
- Custom URL is not available
- User cancels opening of custom URL