Pessoal me ajuda nesta aqui...
Estou querendo fazer a função de backbutton
, porem já tentei algumas forma e todas fazem com que o aplicativo saia. No emulate ja esta funcionando.
Faço seguinte:
function onLoad() {
document.addEventListener("deviceready", onDeviceReadyBack, false);
}
// device APIs are available
//
function onDeviceReadyBack() {
// Register the event listener
document.addEventListener("backbutton", onBackKeyDown, false);
}
// Handle the back button
//
function onBackKeyDown() {
window.history.back();
//alert("entro aqui");
}
Como fazer para não sair da aplicação ?