I have a problem in ionic application, When backbutton is pressed the application closes. I used ionic sidemenu in my application.I got a code from ionic forum to prevent hardware back button. But it is too uncomfortable
$ionicPlatform.onHardwareBackButton(function() {
event.preventDefault();
event.stopPropagation();
alert('going back now y'all');
});
I want to close the application only on double tap of hardware back button.
When i press backbutton once , a message should appear in bottom of phone like - press again to exit It should close automatically.
I completed my application almost 99% . But my only problem is this backbutton.