2 Replies Latest reply on Mar 26, 2014 11:39 AM by David Miller

    Scanner.enable and $.mobile.ajaxEnabled = true;

    David Miller

      Hi

       

      I am trying to improve the performance on a RhoMobile 2.2 application on a WM6.5.3 device (MC55A0).

       

      I found Darryn Campbells blog (RhoElements Performance Improvements #3) and started fiddling with the 'default JQuery Mobile Settings'.  After setting to the following in layout.erb...

                      $.mobile.defaultPageTransition = 'none';

                      $.mobile.defaultDialogTransition = 'none';

                      $.mobile.ajaxEnabled = true;

                      $.mobile.pushStateEnabled = true;

                      $.mobile.loadingMessageDelay = 5; // in ms

                      $.mobile.loadingMessage = "Loading...";

       

      ...things are looking good!  The screen transitions are faster and the "Loading..." message is good.  It's fast enough for me to keep JQM in the layout.erb. 

       

      However, the Scanner now doesn't activate.  Simple code...

       

      def scanPage

          Scanner.enable

          Scanner.decodeEvent = url_for(:action => :decodeEventCallback)

          Scanner.enabled = "SCN1"

      end

       

      When I revert and change the line above, $.mobile.ajaxEnabled = true; to $.mobile.ajaxEnabled = false; the scanner works again.

       

      Not sure why ajax would cause this behaviour?

       

      I know using JQM is not ideal on WM devices but hey.  Any help appreciated.