Deprecated: Assigning the return value of new by reference is deprecated in /home/schwe4/public_html/zechariahs/blog/wp-settings.php on line 520

Deprecated: Assigning the return value of new by reference is deprecated in /home/schwe4/public_html/zechariahs/blog/wp-settings.php on line 535

Deprecated: Assigning the return value of new by reference is deprecated in /home/schwe4/public_html/zechariahs/blog/wp-settings.php on line 542

Deprecated: Assigning the return value of new by reference is deprecated in /home/schwe4/public_html/zechariahs/blog/wp-settings.php on line 578

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/schwe4/public_html/zechariahs/blog/wp-settings.php on line 18
Digital Meanderings » 2009 » March

Archive for March, 2009

Join the Conversation

If you’re a reader of my blog, or a friend of mine, you know I recently started working on a new project named BlackPing.  BlackPing is my first foray into BlackBerry development and what a bumpy road it’s been.  The BlackBerry API (for CLDC applications) is very robust and is written in Java. Java is a big part of my life, I’ve written thousands of lines of code and most of it has made it into a production environment.  But writing for the BlackBerry is different.  You may know how to speak the Java language but do you know the BlackBerry dialect?  Different APIs, different rules, different constraints to take into consideration.

Over the years I’ve learned a few different languages - C, C++, Java, Java Script, some PHP, some Perl, some Ruby-on-Rails, PL/SQL and a slew of other ones.  With all of them I learned through trial-and-error, by looking over a friend’s shoulder or by looking at code examples.  I only ever asked for help at 3am.  Once my brain was fried, my eyes about to bleed and I could barely write a coherent sentence let alone a technical paragraph describing the problem I was having.  Not a good, or fun, way to learn a new language.

This time I decided to do something different - instead of simply posting questions to a forum I found, I tried answering them.  A lot of the posted questions were well over over my head but I read them anyway.  I performed Google searches, I analyzed what other people wrote back.  I tried to understand, I asked questions about the responses not the original post.  By joining in the conversation I was able to learn a lot about BlackBerry programming.  More than I ever would have using my trial-and-error methodology.  By reading what other people had to say I found problems in my application that I didn’t know I had!  I was able to find cool coding tricks and learn what else the BlackBerry API had to offer.

By joining the conversation I was able to rapidly expand my knowledge of what the BlackBerry API allowed me to do.  I think this is the way I’ll try to learn every new language.

Wednesday, March 25th, 2009

BlackBerry Application OTA Download Setup

While working on my latest project, BlackPing, I ran into another snag - I couldn’t get my application to download Over-The-Air (OTA).  The problem was due to my lack of understanding, hopefully my trouble is your gain.  Below you’ll find instructions that guide you through preparing your application for OTA downloads.

Setup the HTTP Servers MIME Types

If you do not have administrator access to your web server then you’ll need help from the administrator to perform the following.

Verify that there are MIME Types setup for COD and JAD files.  The correct MIME Types are respectively “application/vnd.rim.cod” and “text/vnd.sun.j2me.app-descriptor”

Upload the Application to the Server

You’ll need to upload the application’s COD, JAD and JAR files to the web server.

Create an HTML “Download” Page

This is the part that I spent a while figuring out.  During my first attempts at OTA installation I opened the BB Browser and went directly to the application’s JAD file.  Each time I did this the browser displayed the contents of the file instead of trying to download and install it.

To get around this issue, create a “download” page.  I recommend a simple page that way you don’t have to worry about the page renders on varios BlackBerry devices.  This page should reside in the same place as the application files, but you can place it whereever you want, you’ll just have to do more configuration.

My simple download page:

<html>
<head>
<Title>Download [APPLICATION_NAME]</Title>
</head>
<body>
<a href=”[APPLICATION_NAME].jad”>Download</a>
</body>
<html>


I hope this post saves you some trouble.  If it does, or if you have questions, please leave a comment.

Sunday, March 1st, 2009