Cordova inappbrowser doesn't open in new webview on Android

824 Views Asked by At

I have a problem with Cordova InAppBrowser Plugin (within an ionic app, if this is relevant).

I try to open a new webview with a url (for authentication purposes). This should be a new webview, I need to get the loadstart event in my original cordova-webapp.

The following code works within iOS as expected, but on Android it seems to open the URL within the same webview (and not in a _blank, like specified). Do I miss something, or is this a bug?

var browserRef = window.open(flatserverurl+'/tokenlogin?redirect=http://localhost/callback', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
browserRef.addEventListener('loadstart', function(event) {
  // do something with the url
});

system info:

  • cordova 4.3.0
  • com.ionic.keyboard 1.0.4 "Keyboard"
  • cordova-plugin-inappbrowser 1.0.1-dev "InAppBrowser"
  • org.apache.cordova.console 0.2.13 "Console" org.apache.cordova.device
  • 0.3.0 "Device"

tested it on Nexus 4 with Android 5.1.1 and two genymotion Android emulators (4.4.4 and 5.0.1)

0

There are 0 best solutions below