I have a phonegap/jQuery Mobile Android app that opens an external URL (which I can't modify its contents) using window.open(URL)
.
The problem is that I can't get it to close and return to the "normal" app, I get the following error in the logcat: Uncaught ReferenceError: cordova is not defined", source: here_goes_the_external_url.html
A little below the logcat shows: "exception firing pause event from native", source: here_goes_the_external_url.html
The thing is that I don't know if the cause is that I'm capturing the "back event" to control exactly what happens when the user presses it, I have this in my onDeviceReady() function: document.addEventListener("backbutton", pressBackButton, false);
Is there a way I can force the back button to close that window? It seems that once it opens that window cordova isn't active anymore (thus the undefined error), but isn't it the point of the inappbrowser, to open it inside the app?
And yes, I forgot to mention, I'm loading the inappbrowser plugin