I am making an Android app with Phonegap Cordova and I have a problem with the back button I would like to go back to the previouspage in my app I was looking for some examples but I'm stuck now
I tried this :
document.addEventListener('backbutton', backPressed, false);
function backPressed()
{
navigator.app.backHistory();
}
It can enter the backPressed() function but navigator.app.backHistory() doesn't work
I also tried with history.back(-1) but it doesn't work too
I don't know if I need to install a cordova plugin
Thank your for your help