I have a phonegap application that needs to grab the back button. This works smoothly, but when I am on the main screen and press the "Back" button, I want to call the source event handler and close the application or do everything that naturally comes to the platform with such a print. I know that I can say that the application is leaving, but I understand that this is a bad form for iPhone applications.
No matter what I try (and I tried a lot of things), I can not start the original handler. Any advice?
In my code, I have a switch statement inside the backbutton event handler that directs the application to the action as necessary:
switch blahBlah { case 'this' : doThis() ; break; case 'main' : // What do I do here that is well behaved for all platforms??? break; default: doFoo() ; }
source share