Programmatically install and upgrade applications

by Retired ‎02-12-2010 04:15 PM - edited ‎02-17-2010 11:29 AM (40,393 Views)


This article applies to the following:

  • BlackBerry® smartphone


There are multiple ways to install an application on a BlackBerry smartphone. The native support mechanisms are described in DB-00041. Along with the native installation mechanisms, it is possible to programmatically install or upgrade an application. This can be done by downloading the application's .cod files from a server, such as a web server, and using the CodeModuleManager class to install the .cod file on a BlackBerry smartphone. A sample application demonstration can be found here.

This sample application reads a configuration file from a web server, which lists the applications to be installed or upgraded. The format of the configuration file is explained in the Installer class. The .cod files to be installed must also reside on a web server. Refer to the comments at the beginning of the file for information on the format of the configuration files.

Note: An application cannot upgrade itself.