OtaLoad

OtaLoad demonstrates network connections, the downloading of an application "over-the-air", and the ability of one MoSync application to run another.

This example is included in the MoSync SDK installation in the /examples folder. For information on importing the examples into your workspace, see Importing the Examples.

Behaviour

OtaLoad is a small application that downloads another MoSync application "over the air" (using HTTP), caches it in permanent storage and executes it. If there is already a copy of the application in the cache, the user is given the option to run it immediately or ask the server for a new version.

Important! Before running this application on the MoSync emulator or on a target device, do the following:

  1. Build the target application that you intend to download using the same version of MoSync that you will use to build OtaLoad.
  2. Put the target file on a webserver.
  3. Finally, in the OtaLoad.cpp file, specify the location from which the target file will be downloaded.

The target application must be a .comb file and must contain you compiled program and any resources (images, etc.) that it needs. The target application cannot contain any unloaded resources such as ubin or umedia. When you compile your target application, MoSync will put it in the /Output or /FinalOutput folder in your workspace. Find the .comb file and put on a webserver. If you haven't got a webserver you can use free services like http://www.dropbox.com to host your file.

Key Presses

  • 6 or soft-left — downloads the target application/checks for updates
  • 0 or soft-right — closes the OtaLoad application

 



Share on Facebook