Ruby, Mobile, Games and Programming

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

Ruby Kernel.fork on Windows

Kernel.fork is used to start a subprocess, which is sometimes needed over just a Ruby thread (which is still part of the current process). Unfortunately it doesn’t work on Windows because Windows doesn’t support the fork(2) command.

However, it does work under cygwin! Which is really useful :)

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.

N95 sync on Mac

I asked myself a question: “Hmm, I wonder if its possible to sync my N95 with my mac”. My answer: “Doubt it”

Funny that, I am now not only able to sync my N95 with my Mac, I also don’t need todo anything because it does it all automatically when I move my N95 within bluetooth range of my Mac. I love my Mac :)

For those wondering how I did it, I followed this useful guide that pretty much walked me through it. To summarise what you need from that post:

  1. iSync

    This was already on my Macbook with Leopard.

  2. Nokia N95 plugin for iSync

    This was probably the only step that caused me problems. The latest version of iSync is 3.0, and Nokia’s iSync plugins are only for 2.4. So in the end, I had to purchase a plugin from here. It was only 8 pounds though, so for me it was well worth it.

  3. Home Zone

    This is what detects when your device gets in Bluetooth range and starts a script. You can get it from here.

  4. Automator app for the sync

    You can get this from here. You just need to unzip it, and put it in your Applications folder (or somewhere you can find it).

I recommend following through the guide though, its pretty straight forward :)

Over the Air - Wrap up

So what did I think of Over the Air?

Well I will definitely be going next year, thats for sure. It was great fun, and very informative too. When your so focused on developing a product, its sometimes easy to loose track of the bigger picture. Events like these really help to keep an open mind, and keep things in perspective. Its also great to meet other developers in the same space, and exchange ideas.

A big thanks to everyone who help setup Over the Air, I really enjoyed it :)

Over the Air - Silly glasses

This session was with Dr. Paul Coulton of mobileradicals - Lancaster University. Despite the misleading title, it was not a talk about big purple sunglasses! It was about creating uniquely mobile experiences.

And it was great.

The session was really thought provoking, and ideas where whizzing through my head almost constantly.

I really encourage you to check out the mobile radicals website, and have a look at the different projects they’ve got there. There is some really interesting stuff. Experiments with RF Tags, Accelerometers, etc. There is so much scope outside of what we’ve got on mobile today.

Over the Air - Visual Design on Mobile

This session was with 2 guys from Idean; Petri Heiskanen and Harri Lehmuskallio.

I think this was a fantastic session. It was great how the discussion evolved into a open dialogue between the speakers and the audience, and for me it was really great to see interaction between an artist and a user experience designer.

The biggest thing I got out of this session, was it has allowed me to change the way I think about UI design. Typically (and stereotypically in fact), a programmer tends to design a UI around functions, and sometimes you can easily see a UI that has been designed by a programmer. I’m not trying to slag of programmers, everyone is different, but generally programmers are not good at UI design.

After this session, I found myself thinking about UI design in a totally different way (i.e the user’s experience, not features or functions). “Right, I want this application, and I want it todo this!”.

It has also opened up my eyes to the importance of a user experience designer/engineer. This is something Steven has been saying for a while, and after this session, I can so clearly see the benefits of having someone purely as a user experience engineer, where as before I had trouble seeing it outside the role of an artist. The 2 things are so so different, they are not the same!

Over the Air - Prototyping on Android

This session was with Tomi Mickelsson from Idean.

I’m embarrassed to say that although I have downloaded the Android SDK, I have not really had time to take a good look at it. This session was good for me, because it allowed me to see a bit more in depth what Android was in terms of developing an application.

The main things I took away from the session was that Android seems to be coming along nicely. Not much to say I know! Things like xml driven User Interface definitions, a new UI layer replacing the utterly useless MIDP layer, are all steps in the right direction as far as I’m concerned. Apparently, although it supports Touch, it is single touch rather than multi. The difference being that with multi, it can track more than one movement (i.e on the iPhone you can move 2 fingers in an outward motion to zoom out). But things are changing alot with Android, so I wouldn’t be surprised if this changes.

I suppose the biggest thing this session showed me, is that I really need to set aside some time to have a really good look at Android.

I’m wondering about setting aside a day where everyone in our office can freely experiment with Android, and see who can make the best app/game in a day? :)

Scribe blogger N95

This is a post using Scribe on my N95.

I had an issue after installing it, which was fixed by reinstalling python and scribe into phone memory. There seems to be problems if they are not both installed there.