Mobile Development

J2me

Nokia invalid JAR

Quite a fun problem.

Installing an application from the JAD says invalid JAR on some Nokias, but installing direct from the JAR works fine.

The problem as it turns out, is that there is a bug on some Nokias where if the version ends in a 0 (i.e 1.1.0), it says its invalid.

Very stupid, and very annoying bug. Thanks Nokia

Automated Blackberry sign tool (Mac, Linux & Windows)

There is a way to get Blackberry to be built and signed, on Mac, Linux & Windows. Heres how:

BB Ant tools

Need I say more? Well for the most part no, these tools work exactly like described. All you need is the JDE bin and lib folders, and the ant tasks for bb-ant-tools.

However if you need to get the signing tool to work, there is a little bit of info you need to know:

The signing tool looks for 2 files: sigtool.csk and sigtool.db
These must be in the bin folder for the JDE, alongside the SignatureTool.jar.
If your on windows, this works fine. If your on mac or linux, this doesn’t. Why? Because the SignatureTool is stupid.

It looks for the files like this: “..\bin\sigtool.csk”. So on anything that doesn’t use \ for dir seperators, this doesn’t work. You can trick it though, by making a softlink:

% ln -s bin/sigtool.csk bin\\sigtool.csk
% ln -s bin/sigtool.db bin\\sigtool.db

The signature tool now finds the files, yay!

Most people think the signature tools are restricted to your machine. However they are not. The csk and db file can be put on any machine, and the signatureTool will work. Be careful you don’t distribute your registration files though, because thats what RIM use to trace a malicious application.

For our development, I have put the JDE’s bin and lib folder into our subversion repository. So all developers can sign and build without needing to install the JDE, and it doesn’t matter what OS they are running either :)

Hope this is useful to someone, because theres not much info out there on BlackBerry development on other OS.

J2me threading issues on Nokia S60

Had a strange thing happen with the Nearme app I’m working on. When installed onto the phone memory, the app is blistering fast on my N95. But when installed onto the mass memory (memory card), it runs incredibly slow during network activity.

It just sounds like bad threading code, but the GUI and the network are in separate threads and considering it runs very well on phone memory, and on other handsets, it leads me to believe its an issue with j2me apps on the memory card.

I will post an update once i’ve gotten to the bottom of it. I’d be interested to hear if anyone else has seen this.