Knowledgebase
Deploying a BlackBerry Application for Over the Air (OTA) Download from an Apache Web Server
Deploying a BlackBerry Application for Over the Air (OTA) Download from an Apache Web Server
Step 1: Obtain a OTA deployment package from Vayusphere or your application vendor. This will typically be a ZIP file containing a file with a .jad extension and one or more files with *.cod extensions.
Step 2: Modify your Apache web server configuration to add two new MIME type handlers. This is typically done by editing the main httpd.conf file to add these 2 entries, if not already present. (Advanced Users: You can do this in a .htaccess file as well if your configuration permits)
AddType text/vnd.sun.j2me.app-descriptor .jad
AddType application/vnd.rim.cod .cod
Restart your Apache server.
Step 3: Navigate to the directory where you would like to make the application available for download. You can do this via shell access or using an FTP client.
Copy the application's JAD file to this directory. This file will have a name similar to applicationname.jad
Copy the application COD file(s) to this directory.
[Important: Please see Appendix 1 at the bottom of this note for additional instructions for Step 3. These are not required for Vayusphere provided OTA packages, but if you got your OTA package from another vendor or are trying to use these instructions for another vendor's application, please read the Appendix 1 carefully.]
Step 4:
Based on the directory you have deployed your JAD and COD files in, identify the http URL for the JAD file. For example, http://support.example.com/vayuxmpp/xmpp.jad
When your users connect their BlackBerry browsers to http://support.example.com/vayuxmpp/xmpp.jad , the application will auto download. Behind the scenes, all the required cod files will be transparently loaded by the Blackberry as one application.
That's all it should take
Note that there may be more than 1 OTA package to correspond with a specific version of the BlackBerry Operating System or device. In this case you should repeat this process in different directories, one per package. This will result in a different OTA URL for each version. Instructions on how to auto detect the end user's BlackBerry OS version and redirect them to the correct OTA URL are not covered in this note.
Appendix 1
Additional Instructions for Step 3.
Note that COD format is essentially the same as a ZIP format, so any ZIP tools can be used to create or unpack a COD file.
Examine appname.jad file in a text editor to see if it makes a reference to more than 1 COD file. See example below which has 8 such references. This will usually be the case if the application is larger than a certain size. In this case, it will become necessary to split the master COD file into the several "baby" COD files referenced in the JAD file. All the baby COD files referenced in the JAD file must be made individually available in this same directory.
In the sample xmpp.jad file excerpt below, there are 8 baby COD files, XmppClient.cod and XmppClient-1.cod through XmppClient-7.cod. Their sizes are also listed. For this example, you ensure that all the 8 files are available in the directory, along with the xmpp.jad file
Excerpt of sample xmpp.jad file from Vayusphere.
...
RIM-COD-URL-7: XmppClient-7.cod
RIM-COD-URL-6: XmppClient-6.cod
RIM-COD-URL-5: XmppClient-5.cod
RIM-COD-URL-4: XmppClient-4.cod
RIM-COD-URL-3: XmppClient-3.cod
RIM-COD-URL-2: XmppClient-2.cod
RIM-COD-URL-1: XmppClient-1.cod
RIM-COD-Size-7: 51836
RIM-COD-Size-6: 104212
RIM-COD-Size-5: 90176
RIM-COD-Size-4: 85952
RIM-COD-Size-3: 90460
RIM-COD-Size-2: 86072
RIM-COD-Size-1: 80924
RIM-COD-Size: 68964
RIM-COD-URL: XmppClient.cod
Vayusphere will typically directly provide you these baby COD files in a ZIP format, so all you should need to to is unpack the ZIP file so that all the baby COD files and the JAD file are available in the directory. The instructions of the Appendix step are not necessary.
If however, the baby COD files are not individually made available, and you only see a single COD file while the JAD file makes reference to more than one COD file, you need to split the single COD into these constituent baby COD files. (This may happen if the vendor has provided you with the Desktop Sync deployment package. One way to tell is if there is a file with an extension of .alx in the package)
Fortunately, this step is easy.
1. Rename appname.cod to appnamenew.zip
2. Unzip appnamenew.zip
3. Confirm that the unzip operation has resulted in all the baby cod files you need. If you don't see the baby cod files, contact your vendor.
