I'd like to have an eventListener on backbutton of the iPhone.
I know i can make a custom backbutton, but this is not native! Its the native backbutton i want, there should be a way of knowing when this button is pressed.
As for the reason: When i press a button a window opens with a mapView.
Now when i press back the gps is still on, and i read that the mapview still exist. So i want to remove the mapview and close the window and any other method to shut down the gps.
3 Answers
Accepted Answer
The back button does the same as window.close(), so you can try to catch the close event of the current window.
customBackButton.addEventListener('click', function() { navGroup.close(currentWindow); });
For IPhone only (Android:back event works for Android catching back button): On a tabgroup, listening to the close event of the windows in each tab does not seem to catch the back button being pressed. I am using SKD 2.0.1 GA2. Anyone has a solution?
Your Answer
Think you can help? Login to answer this question!