EddyVerbruggen / Custom-URL-scheme

:link: Launch your Cordova/PhoneGap app by a Custom URL scheme like mycoolapp://
1.03k stars 367 forks source link

handleOpenURL being fired when I call cordova.InAppBrowser.open #226

Open dbarn opened 7 years ago

dbarn commented 7 years ago

I have both the InAppBrowser plugin and Custom URL Scheme (scheme: mycoolapp) plugin installed in my app (IOS).

When make a call to open a browser window or an external app (not mine) handleOpenURL always fires.

I have:

function handleOpenURL(url) {
    setTimeout(function() {
        console.log('Handle open URL');
        console.log(url);
        alert(url);
    }, 0);    
}
// open link code
document.querySelector('.button1').addEventListener('click', function(){
    cordova.InAppBrowser.open('http://www.google.com', '_system');
});
document.querySelector('.button2').addEventListener('click', function(){
    cordova.InAppBrowser.open('notmyapp://?stuff=test', '_system');
});

When I hit either of the two buttons handleOpenUrl gets fired.

Is this normal?

Thanks for any feedback. Dave

jkalderonkiros commented 7 years ago

+1

SteeBono commented 6 years ago

+1 Same problem.

darylldawn commented 6 years ago

Anyone able to solve this?