Phonegap - How do I get back when the Google Maps Terms of Service button is clicked?

I am making this application on PhoneGap that contains a map. On the standard Google map in the lower right corner is the "Terms of Use". If I click on this, a new screen will open. But I can not use the built-in Android Backbutton.

What should I do?

Somewhere else in the project, I used this (under this) javascript to return to the previous screen, but since the Terms of Use screen is not a JS file, how can I say that it can / cannot (return to the previous screen) ?

document.addEventListener("backbutton", function(e){
    e.preventDefault();
    navigator.app.backHistory();
}, true);
+5
source share
1 answer

. , click , , URL- , URL- InAppBrowser.

$('#map_canvas').on('click', 'a', function(e){
    e.preventDefault();
    window.open($(this).attr('href'), '_blank');
});

http://docs.phonegap.com/en/2.7.0/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser

+9

All Articles