Intercepting SMS messages for Jaiku

New SMS notification: “nicholasclarke: A crazy week of work coming up! Never a good thing.”

Combine that with ability to intercept text messages into my own application on my phone, this basically means I can write a Jaiku application which keeps track of everyone’s Jaikus but doesn’t interfere in my day by beeping and flashing at me 24/7.

In theory, this means I could write a Windows Mobile Jaiku client that stays off GPRS.

Jaiku over GPRS stays active

Tonight I’ve been focusing on creating a Jabber IM client that will connect to Jaiku and receive live updates as and when they happen.

Development

I started off again by looking at the agsXMPP MiniClient code. This covers pretty much everything I was interested in achieving tonight, but I wanted to break it down to a bare-bones application that just showed me my communications with Jaiku and some debugging information.

This was great, and worked well to show me the many #testku messages I was sending. The screenshot on the right shows one of the test messages received.

Going wireless

I unplugged my phone from the computer and turned on the wireless LAN. Again, predictably, I could connect fine and it was pretty cool receiving updates from Jaiku as I walked around the house – yes, I’m that sad.

The problem here was that the moment I touch the power button on my phone, the wireless card turns off and the connection is lost, which definitely doesn’t help me. I had a sneaky feeling that GPRS might be slightly different, so I tried that instead.

Jaiku over GPRS

Like the other day, I had trouble again connecting to Jabber over GPRS. It seems to send a few packets and receive a few back, but then halt when trying to send any more. A handful of attempts later I was able to create a full connection.

GPRS was on, Jabber was connected, and Jaiku was slowly receiving messages. So I turned my phone off.

And turned it back on.

Amazing! I was truly impressed that the message I had sent from the PC while my phone was off was already waiting for me to see when I turned the phone back on. Not only was the connection re-established, but it had never been lost – implying that the Jabber connection was still receiving messages in the background even though the phone looked dead.

What does this mean?

In short, it means I can make a program which stays connected to the internet all day and receives updates about my contacts and their statuses. Jaiku for Windows Mobile could work even better than I thought.

Jabber over GPRS on Windows Mobile

agsXMPP MiniClient screenshot

Andy Smith (a key developer at Jaiku) confirmed recently that the Jaiku Mobile Nokia client uses XMPP (Jabber) to communicate with Jaiku. Although the full API used for this interface hasn’t yet been revealed, I thought I best make sure first thatI could create a suitable Jabber connection over GPRS from my phone.

A little Google searching at lunch led me to the agsXMPP SDK, a dual licensed XMPP library which definitely has the potential to do what I want. The project is very well structured, with versions not only for Visual Studio 2003 and 2005, but also Mono for any Linux users.

The screenshot on the right is the sample MiniClient PPC project provided with the SDK. It took me a few attempts to connect, and then after that I had a pretty stable and responsive chat with myself over a GPRS connection.

I look forward to integrating this with my Jaiku application.

Unlimited data with Orange! Not

Jason Langridge talking about “unlimited” data traffic made me think how similar this is to what I get each month from Orange:

  • Unlimited texts? 3000.
  • Unlimited evening and weekend browsing? 1000Mb.

Incidentally, last night I realised that when I connect to Orange World over GPRS it thinks my phone is PAYG, even though I switched to a nice contract about a month ago. I hope this doesn’t affect my first bill.