4 Replies Latest reply on Jul 28, 2012 9:21 AM by Jeff Haluska

    RhoElements Cursor Display during Wakeup or resume

      I am having trouble with my application when a device is coming out of a sleep, or suspended mode where the wifi is turned off. My buttons call web services, and they do not respond or show any type of behavior when pressed, and the device is still awakening from sleep/suspend mode and the wifi is turning itself back on.

       

      Does RhoElements provide a setting or anything to display a wait cursor while the device is awakening? Has anyone else run into this issue and found a different workaround?

       

      Not that it matters, but I am currently running my application on a mc75, running windows mobile...

       

      Thanks for any and all the help...

        • Re: RhoElements Cursor Display during Wakeup or resume

          Hello

           

          Is it possible for you share your application code so that we can look into that to see the problem.

           

          Thanks

          Patro

          • Re: RhoElements Cursor Display during Wakeup or resume
            Robert Galvin

            Jeff

             

            Take a look in the help file for the powerOn object. It allows you to call a function when the device resumes from suspend using:

             

            powerOn.powerOnEvent = 'onResumeEvent(%json)';

             

            Then use the hourglass object to turn the cursor on:

            hourglass.visibility = 'visible';

             

            You will also want to use the network object to setup a poll to check for connectivity and then subscribe to the networkEvent to turn the hourglass visibility to 'hidden'

             

            network.networkEvent = 'onNetworkEvent(%json)';

            1 of 1 people found this helpful
              • Re: RhoElements Cursor Display during Wakeup or resume

                Thank you for the information. I did not notice the PowerOn object, my apologies. That was exactly what I was looking for. I am implementing the code now and will report back once I have it and mark this question as answered. Thanks again! 

                  • Re: RhoElements Cursor Display during Wakeup or resume

                    The above approached worked when I was working with a MC75. However it does not seem to be working on the ET1. below is the snippet of code to handle it. Has anyone else had trouble on the ET1 with the PowerOn Event. It seems as if it is not firing the event or something. I am currently running the latest version of Rho(2.0.5.27) with an rev. C.

                     

                     

                    <meta http-equiv="PowerOn" content="PowerOnEvent:url('javascript:onResume(%json);')"/>

                     

                    function onNetworkEvent(jsonObject) {

                    var value = jsonObject.connectionInformation;

                    if (value == 'Connected') {

                                      // hourglass.visibility = 'hidden';

                                      network.stop();

                    var t = setTimeout(function() {

                                          $('#blanket').hide();

                                          $('#resumingPopup').hide();

                                      }, 5000);

                                  }

                              }

                    function onResume(jsonObject) {

                                  $('#blanket').toggle();

                                  $('#resumingPopup').show();

                                  network.networkPollInterval = 15000;

                                  network.start();
                                 network.networkEvent = 'onNetworkEvent(%json)';

                    }

                     

                    This will display a blanket over the screen with a popup until a connected event has been received...