The BlackBerry Developer

Monday, June 12, 2006

OTA Deployment

This weekend I had to learn how to deploy a BlackBerry J2ME application OTA without using a BES server. It sounded easy enough. I had a COD file with my compiled code and a JAD file with the description of my application. I copied the two files out to my Apache web server. I then sent myself an email from Gmail with the link to my BlackBerry (why type when you don't have to?).

When I tried to follow the hyperlink, I received a 502 error. I could hit it fine from my machine but the BlackBerry device could not hit it. I then tried typing the URL into the BlackBerry browser. It connected and displayed the text contents of the JAD file on the screen. This was not the behavior I wanted or expected. I was hoping that the BlackBerry would just install the Java application just as it would Google Maps or any other application I had downloaded from the Web. Time to try a new approach.

I then started to research the BlackBerry Application Web Loader. I downloaded the app and read the BlackBerry Application Web Loader Developer Guide. My executive summary: this is an ActiveX control used with JavaScript for downloading BlackBerry applications and installing them from your desktop using USB synchronization. This application is not helpful for installing applications directly to your BlackBerry.

Now frustrated I decided to compare something I knew worked to my setup. When I used ieHTTPHeaders I found that the MIME Type of the JAD file should be text/vnd.sun.j2me.app-descriptor. Once I changed that and restarted my Apache service, the app downloaded and installed just fine!

The e-mail link problem:
The link I sent myself via email still wasn’t working. I realized that I started taking Gmail for granted. When I sent the URL in the email, it auto-magically created a hyperlink. When I created the link manually by creating an HTML email with an anchor tag and an href attribute, the link worked just fine.

0 Comments:

Post a Comment

<< Home