cpo

cordova-plugin-openurlext

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

Showing:

Popularity

Downloads/wk

7

GitHub Stars

7

Maintenance

Last Commit

4yrs ago

Contributors

4

Package

Dependencies

0

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100