Back and menu button

Back and menu button

BY 24 Aug 2013 Web Application Development

I cannot work back and menu button on the device and emulator.

To do this, I did do that,

document.addEventListener( ‘tizenhwkey’, function(e) {

if (e.keyName === ‘back’) {

if ($.mobile.activePage.attr(‘id’) === ‘main’) {

tizen.application.getCurrentApplication().exit();

} else {

history.back();

}

}

else if (e.keyName === ‘menu’) {

 }

});

 

How can I fix it? Please let me know.

Thanks 

Written by