I need solution like if i leaving application some action is triggered.
my game is based on some .mobi files with dynamic content, transition between pages through phoneui.gotoPage.
and when i leave some of page (pressing home button or something), let’s call it “#m1-somepage”, the program must do something.
im trying bind pagehide like:
$(‘#m1-somepage’).bind(‘pagehide’, audio_stop());
but it always fires before page hides (on page load), tried everything like pageshow, pagebeforehide etc….
i dont understand why it fires BEFORE #m1-somepage loaded. and im stucked. is there any reliable solution how can we handle closing of application or just changing page (like returning in main menu)