Building a MIDlet 2.0 App for a RIM 8100

If you read my last post then you’ll know I’m having some fun with a RIM 8100 and J2ME programming. Last time I looked at some tools and got a “Hello World” type application deployed to my phone. Now I’m ready to take the next step and write an application from scratch using the MIDlet 2.0 framework. I’ll be targeting my Pearl 8100 phone. For programming work I’ll be using RIM’s JDE Eclipse Plugin Beta so I am dancing on the edge of technology, but I guess that’s what makes it fun – as long as I don’t break my phone 🙂

First of all I’ll say the Blackberry Developer site has a ton of really nice documentation. One of the best I’ve seen. There are forums there too – so register right off for posting. The first thing I wanted to do was port over an application that a partner had built. This was pretty easy – I created a new project using the supplied project wizard, then I dragged my app code over into my source tree, I refreshed the project and all my code was imported ok.  I built the project and then I had a program ready for loading onto my phone. Not bad.

Er well…there are a couple of steps I need to do. The first is that you have a few settings to touch up in the project properties notebook.  Right-click on your project and go to properties. Click on the Blackberry Properties in the left column. There’s a number of pages to complete. The two most important things to do is identify your main class for your midlet application and to pick out an icon for the program.  From my work I found that if I didn’t do both my app would get to the phone, but would not show up on the screen. I just grabbed an icon from one of the SDK sample apps.

The second is that I need signing keys because my app is using protected APis…specifically bluetooth APIs. $20 later (there’s info on the developer site on how to get these) I have my keys. In Eclipse there is a “key signing” menu or there is a stand alone app you can get from the RIM developer site.

One you get that stuff installed it is a simple process to get your app signed. After signing the app you are ready to deploy the app to your phone, but what I have been doing is a first run on a simulator. You can grab simulators from here. The simulator provides a pretty realistic test of your app. This one is my phone with one of the sample apps running that I “tweaked” a bit. Its a little strange trying to navigate the trackball with a laptop stick-mouse thing, but it does work.

There are a few things I’m still working on:

  1. I’m trying to use some of my own jar files and I can’t seem to get these deployed with the app to the phone. Everything looks ok in Eclipse, but when I look in the .cod file I do not see the jar or classes. On the phone I just get class can’t be found errors.
  2. There’s not too many midlet samples in the RIM SDK. I’ve found a bunch on Sun’s site, but I think I’m missing out on how to use a lot of RIM’s UI classes and stuff. I’ll be trying out some of their CLDC apps and seeing if I can learn stuff from those.
  3. I’d like to learn more about data persistence and storage. I need to be able to parse up a data stream and store it as an xml file.

I’ll be heading out to RIM’s first developer conference in a couple of weeks. My goal is to learn as much as poassible before then so that I can get teh most out of the sessions. I’ll post an update when I get back.

Leave a Reply

%d bloggers like this: