3 Replies Latest reply on Oct 27, 2011 3:19 PM by Joshua McGinnis

    Automatic Updates ?

      So - I just read a thread here on the board that talked about RhoElements getting an update in a week or two - Does RhoElements have an automatic update feature?

       

      There are some environments where device management just isn't possible - and neither is pulling every device in for an update - so it'd be nice to have Rhoelements just do an automatic update (considering that the device is likely connected to the net anyway).

       

      At the same time - I'm wondering if there's a way via javascript to check the version of the RhoElements Client being used? This could make it so users are prompted to do an update if one is required for a certain web application or restricting access based on if someone has an older / newer version so things don't break.

       

      Just a thought.

        • Re: Automatic Updates ?
          Robert Galvin

          Ronald

           

          Good suggestion, however there is no built in automatic update feature.  You can deploy a mechanism to check for version using the application.getVersion() method. Here is an example:

           

          <!DOCTYPE html>
          <html>
          <head>
          <META HTTP-EQUIV="Application" content="VersionEvent:url('javascript:fnVerJSON(%json);')">
          </head>
          <body style="padding-top:30px">
          <SCRIPT>
              function fnVerJSON(jsonObject)
              {
                  var theOutput = "<B>Product Version:</b> " + jsonObject.productVersion + "<P>";
                  theOutput = theOutput + "<b>Hot Fixes:</b><P>";
                  for (var i=0; i<jsonObject.hotFixes.length; i = i + 1)
                  {
                      theOutput = theOutput + "  Hot Fix: " + jsonObject.hotFixes[i] + "<BR>";
                  }
                  theOutput = theOutput + "<P>";
                  theOutput = theOutput + "<b>Installed Components:</b><P>";
                  for (var j=0; j<jsonObject.componentVersions.length; j = j + 1)
                  {
                      theOutput = theOutput + "  Module: " + jsonObject.componentVersions[j].module + ', Version: ' + jsonObject.componentVersions[j].version + "<BR>";
                  }
                  outputDiv.innerHTML = theOutput;
              }
          </SCRIPT>
          <div id="outputDiv">Version Goes Here</div>
          <P>
            <INPUT align="center" type="button" value="Retrieve Version" onclick="application.getVersion()"><br>
          </body>
          </html>
          

           

          The returned JSON Object will have a property called productVersion and you can also see a list of all of the individual componentVersions and hotFixes. You could then follow this up by using the fileTransfer object to retrieve a newer version of RhoElements. Once the transfer is complete you can use a generic.LaunchProcessNonBlocking to launch the install while you quit the RHoElements application.

          • Re: Automatic Updates ?

            Is Motorola MSP (Mobility Services Platform) an option? We just bought 10 licenses, in part because of this exact reason. We needed the ability to mass updates and deployments to our devices located at physically different locations.

             

            Rob: Is there a reliable location for receiving the RhoElements updates in the case that I built an update script?