Open full view…

Android Back Button

Mon, 02 Jan 2017 11:29:02 GMT

Hi All, I have developed an android app with framework7. Everything is working perfectly. But when I am pressing hardware back button, the app exits, It is not going to the main view,,Plss anyone help..How to solve this problem

Mon, 02 Jan 2017 14:32:42 GMT

document.addEventListener("backbutton", onBackKeyDown, false); function onBackKeyDown() { //do stuff }

Sun, 08 Jan 2017 14:54:12 GMT

Can you send full code..??I didnt understand plss..

Kerry D
Mon, 09 Jan 2017 10:57:09 GMT

Add that code to your application's Javascript file. The first line is an event listener for when the Back Button is pressed. You can see it in the Cordova docs here Note that you can only monitor the back button when your app is packaged in Cordova or Phonegap. Add the event handler to the 'onDeviceReady()' block.