1

I have an issue i've been encountering with Android 2.2 and 2.3.3 avd/phone but not if i use intel atom image for avd. I'm using phonegap 2.3.0 and jqm 1.3.0. I'm missing a pageshow event on a page and my application gets broken meaning navigation doesn't work anymore:

    03-19 16:09:13.045: I/CordovaLog(2733): Found log level DEBUG
03-19 16:09:13.045: I/CordovaLog(2733): Changing log level to DEBUG(3)
03-19 16:09:13.055: I/CordovaLog(2733): Found preference for useBrowserHistory=true
03-19 16:09:13.055: D/CordovaLog(2733): Found preference for useBrowserHistory=true
03-19 16:09:13.065: I/CordovaLog(2733): Found preference for exit-on-suspend=false
03-19 16:09:13.065: D/CordovaLog(2733): Found preference for exit-on-suspend=false
03-19 16:09:18.395: D/CordovaLog(2733): mobile init
03-19 16:09:20.785: D/CordovaLog(2733): init pgSplash
03-19 16:09:20.995: D/CordovaLog(2733): page before show: pgSplash
03-19 16:09:21.285: D/CordovaLog(2733): pageshow : pgSplash
03-19 16:09:21.355: D/CordovaLog(2733): init
03-19 16:09:22.035: D/CordovaLog(2733): Falling back on PROMPT mode since _cordovaNative is missing.
03-19 16:09:22.285: D/CordovaLog(2733): device ready
03-19 16:09:22.295: D/CordovaLog(2733): check version
03-19 16:09:23.795: D/CordovaLog(2733): init pgLogin
03-19 16:09:24.045: D/CordovaLog(2733): page before show: pgLogin

It's missing the pageshow event for pgLogin and navigation gets broken. I'm binding with :

$('[data-role=page]').live('pageshow', function (event, ui) {

         lastPage = $.mobile.activePage.attr('id');
         console.log('pageshow : ' + lastPage);
...
});

As you can see in log i get mobile init event from jqm, i get device ready event from phonegap and the 1st page : pgSplash triggers all events: init, page before show, pageshow. But after that it gets broken. On 4.1 emulator /galaxy tab device it works without any problems.

Omar
  • 32,160
  • 9
  • 67
  • 108

1 Answers1

0

Are you using jquery 1.9? live is depreciated as of 1.9. Start using on instead of live

Also why not use page id? instead of [data-role=page] and see?

Jay Mayu
  • 15,955
  • 31
  • 111
  • 144