I can't figure out of this. I've opened a child browser in phonegap for android app:
window.open( url, '_blank', 'location=yes' );
this is not quite right. It opens the browser, but the done button doesn't close the browser and not returns to the main application.
I've tried with another solution that I've found:
window.close equivalent in Phonegap with InAppBrowser:
This code is the the phonegap app:
var ref = window.open(encodeURI(url), '_blank', options);
ref.addEventListener('loadstop', function(event) {
if (event.url.match("mobile/close")) {
ref.close();
}
});
This button is created in the url page that I've loaded previously:
<a href="/mobile/close">Close</a>
It doesn't work. Any help?
Update:
- The url opened is such as 'file://...'
- If I set 'location=yes' and push the 'done' button, It tries to close but reappears.