Skip to content Skip to sidebar Skip to footer

Cordova Opening A Web Page In Device Browser

Ok i have a problem.Currently i have edited my CordovaWebView.java class so that when i press the device back button,the application will be asked to close. public boolean backHis

Solution 1:

You have to use inAppBrowser plugin https://github.com/apache/cordova-plugin-inappbrowser

Then you can use this code to open the external browser:

var ref = window.open('http://apache.org', '_system', 'location=yes');

P.S. you don't have to edit CordovaWebView.java to make the back button work, you can do that with javascript http://cordova.apache.org/docs/en/4.0.0/cordova_events_events.md.html#backbutton


Post a Comment for "Cordova Opening A Web Page In Device Browser"