Problem with Cordova inAppBrowser plugin in ios and blackberry

I am developing a corova application for BB10, android, iod, windows8.

in which I have a requirement to open the url in the device’s browser by default.

For this, I used the org.apache.cordova.inappbrowser plugin.

but after using it, I ran into the problem of restarting the application as soon as I get back from the browser. [problem in the whole platform except windows8]

so I used the solution below,

jQuery(document).delegate('.external', 'click', function(e) {
        window.open(e.target.href, '_system', 'location=yes');
        e.preventDefault();
});

<a class="external" href="myUrl">Track Now</a>

with the above solution, Android: it worked fine. Blackberry10 problem: Url does not open in an external browser, it opens only in the application browser, IOS problem: url does not work at all (when I click the link, nothing happened).

So any help on your part is truly appreciated.

+4
2

, . Android, BlackBerry10 IOS.

BlackBerry, blackberry invoke.

function openBlackBerryBrowser(url) {
            function onInvokeSuccess() {
                alert("Invocation successful!");
            }
            function onInvokeError(error) {
                alert("Invocation failed, error: " + error);
            }
            blackberry.invoke.invoke({
                target: "sys.browser",
                uri: url
            }, onInvokeSuccess, onInvokeError);
    }
    if (window.device.platform.toLowerCase().indexOf('blackberry') > -1) {        
        jQuery(document).delegate('.external', 'click', function(e) {
            openBlackBerryBrowser(e.target.href);
        });
    } else {        
        jQuery(document).delegate('.external', 'click', function(e) {
            e.preventDefault();
            var ref = window.open(e.target.href, '_system', 'location=yes');
        });
    }

, -.

+4

-, jquery . - , Android iOS:

:

$scope.openLink = function(url){
   window.open(url, '_system');
};

HTML:

<a href="#" ng-click="openLink('http://www.google.com')">www.google.com</a>

, BB!

0

All Articles