I found this: How do I disable Android Back button on one page and change to exit button on every other page
and this: Android - Disable Device Back button
Which both points to the solution adding an EventListener for the Backbutton and preventing its default action.
However, this doesn't seem to work for my application which basically just consists of several HTML pages + some Javascript and CSS. The Hardware Android Back button will work although I added this code in my Javascript as suggested in both solutions:
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
document.addEventListener("backbutton", function (e) {
e.preventDefault();
}, false );}
What am I doing wrong? What else can I do?