SummaryThis article applies to the following: BlackBerry® Device Software 4.3 and later BlackBerry smartphone |
DetailsWhen publishing an application over the wireless network, the application developer may need to access the contents of the corresponding Java® Application Descriptor (JAD) file to read attributes embedded in the file. The following is a sample JAD file: Manifest-Version: 1.0 In BlackBerry Device Software 4.3 and later, the BlackBerry smartphone introduces support for programmatically reading the contents of the JAD file added or modified after the application has been built. This allows a developer to add dynamic content to a JAD file that could be unique for a particular user or installation. Custom JAD attributes can be read prior to JAD version 4.3.0. However, the custom JAD file attributes must be added to the JAD file before build time and cannot be modified after the application has been built. To accomplish this the JAD file must be added to the project in the BlackBerry Java® Development Environment (BlackBerry JDE) or BlackBerry® JDE Plug-in for Eclipse™. This means that the custom attribute is identical for all BlackBerry smartphone users who install the application and are using BlackBerry Device software 4.3.0 or earlier. For a MIDlet, JAD file attributes can be read by calling MIDlet example:
For more information on JAD files and publishing applications over the wireless network, see theDeploying Java Applications whitepaper. Note: Auto-start applications that read JAD file attributes should implement a short delay (approximately 1 second) before attempting to read JAD file attributes on its first startup. When an auto-start application is installed it will start up in parallel to the BlackBerry smartphone saving the JAD file information. This can result in a race condition where the application tries to read the attributes before they have been saved, resulting in a failure to access the attributes. This only occurs the first time an application is installed and the BlackBerry smartphone is not restarted during the installation. |
|
Keywordsdeploy, OTA, over the air, JAD, property, read, application, descriptor, MIDlet, CLDC, getAppProperty, CodeModuleGroup |