I am developing an app using MoSync SDK.
I have 5 pages. Whenever I try to return back to the previous one, my smartphone's back button doesn't work. I have used the following code:
//back button (on Android).
document.addEventListener(
"backbutton",
function()
{
window.history.back()
},
true
);
// Close the application when the back key is pressed.
document.addEventListener(
"backbutton",
function()
{
mosync.app.exit();
},
false
);
You don't have to deal with it, but if you actually want to, this is the way:
Take a look at this link: http://developer.android.com/training/implementing-navigation/temporal.html