MID action
Finally they turn on the GPRS support for my new phone! I needed a SIM update to use it, but Orange’s SIM updating system has been out of action since the weekend. When it came on today, I had a brief surf, posted to Hype in glorious Technicolor of course and then decided to have a pop at making a MIDlet.
A MIDlet is a Java application designed to run on mobile devices, phones, palmtops, etc. MIDP defines the execution environment and a shoal of other standards define the APIs and everything else. A lot can be acheived. The MIDlet can gain access to almost all of the phone’s faculties and apps can provide lovely graphics or interact with a host of network services over HTTP, SMS or potentially other carriers. There is even an API for multimedia, however, the T610’s implementation of this doesn’t extend as far as controlling the camera :-(
Being a relatively experienced Java programmer, knocking up the source for the Hello world MIDlet was a doddle. The next bit was however annoyingly hard. Once the code was finished I compiled it into a class file. Nothing new there. However, there remains several steps. The class needs to be blessed to run on the KVM device virtual machine. The blessing tools are only available for Linux, Solaris and Windows. So I duly downloaded the J2SE SDK and the Wireless Development Toolkit from Sun on to Louise’s machine. This built the required files and blessed everything.
I shipped the files up to Gradwell and add the MIME types required for the JAR file and it’s descriptor to this site’s root .htaccess file. Everything looked good. I had even tested the app on an emulator that came with the WTK. I managed to download the file to my phone fine as well. However, it didn’t run. Perhaps it needed to be signed, or blessed some other way?
No props to Sun on the tools for this one. Usually they are very good for this kind of thing. I absolutely can’t believe that they’ve shipped a binary blessing tool, preverify
, that isn’t written in Java! How’s that for shooting yourself in the foot? The dev tools are crappy as well, providing little more than a button to push and giving me corrupted screen nonsense at the same time. Why not ship this as a batch of Ant tasks? That way I could do it all on my Mac without any extra effort from them. In addition it would fit into the development cycles of a lot more developers than releasing some shonky app to do it. Dave Dribin has provided a set of tasks to work with the WTK, but these do not get round the problem of not having a compatible version of the binary tool to hand.
Multinational megacorp rating: lower.