Skip to content

PaoloMessina/OpenUrlExt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenUrlExt

Open a specific URL in the external browser of the hosting OS.

Installation

cordova plugin add cordova-plugin-openurlext
OR
cordova plugin add https://github.com/PaoloMessina/OpenUrlExt

License

This plugin is released under the MIT license

API

open

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");
    				});
}
```

Quirks:

  • 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

About

Open a specific URL in the external browser of the hosting OS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •