Archive for the ‘code’ Category

Running Windows Mobile apps from a PC using RAPI Start

Monday, May 21st, 2007

People keeping half an eye on my Wakoopa feed might have noticed that I started playing with RAPI Start this weekend.

RAPI Start is a command-line tool that lets you remotely run commands on a Windows Mobile device from a connected desktop. It’s quite neat, so I want to see what sort of things I can do with it.

Here is noddy first attempt number 1 🙂

The problem:
I get a text message while I’m sat at my desk with my mobile connected to my computer. (For a mobile device, it spends a large amount of it’s life tethered to a desktop – but that’s a discussion for another time!)

I want to reply, but writing on a mobile device is fiddly. I’m sat at a full-sized keyboard, so why can’t I just use that instead?

(more…)

Playing with Google Maps

Thursday, May 17th, 2007

Can’t sleep.

So I thought I’d go back to some of the Google Maps API stuff I last played with about a month ago.

The Google Maps code I wrote before would show my last stored location.

I thought it’d be more interesting to see a number of updates over a period of time – so went back to the code and tweaked it to show updates from the last day, week or month.

Code is a bit messy, but in my defense it is past midnight 🙂

I wanted to use the Google routing algorithm used to show directions – to link together the points that I have been to over time. Assuming that I will probably have taken the most direct route between points, then you would end up with something approximating my travelling over time.

Unfortunately, Google don’t expose their routing stuff in the API. Shame.

And on a related note, apparently if I’d used the Yahoo Maps API to do all of this, I’d be breaching their terms of service.

A friend sent me this:

You may use location data derived from GPS or other location sensing devices in connection with the Yahoo! Maps APIs, provided that such location data is not based on real-time (i.e., less than 6 hours) GPS or any other real-time location sensing device, the GPS or location sensing device that derives the location data cannot automatically (i.e. without human intervention) provide the end user’s location, and any such location data must be uploaded by an end-user (and not you) to the Yahoo! Maps APIs.

Spoilsports! (Well, I guess it’s more to do with the demands of who provides their mapping data, but pah – yay for Google)

Note: This post is a bit thin on content – sorry about that. But Twitter is down, so had to say this somewhere! 😉

Turning C# programs into PowerShell scripts

Tuesday, April 17th, 2007

I mentioned PowerShell – the new Windows command shell and scripting language – last year when I first tried it out. But other than playing with it a little, I kind of put it to one side and forgot all about it.

Yesterday I picked it up again and started playing with it again – using it to develop functions for WebSphere MQ (accessing it through the .NET DLLs that come with WMQ). The idea was to start and produce something which expands on the command line administration tools that come with WMQ – adding features that perhaps we don’t already provide.

You can see a walkthrough of what I’ve come up with so far on a post I wrote for the Hursley WMQ blog, but I thought I’d quickly draw out some of the more interesting bits that I learnt in doing it.

(It’s worth pointing out that if you’ve come to this page from Google looking for PowerShell tips and best practice, that I’m very much a beginner. As I highlight in the WMQ post, this is the product of an evening’s playing around – pretty much just trial and error and seeing what tab-complete suggests. It seems to work, but whether it’s the best way to do it… dunno 🙂 )

(more…)

RE: Where am I?

Friday, April 13th, 2007

I mentioned yesterday that I never got round to writing the bit of code for my location service client which would look for known wi-fi access points.

To recap, the idea is that my phone should be able to look for the access points within range, comparing the SSIDs against a list of known locations. If a match is found, it looks up the name and GPS coordinates of the location from the known store, and uses an HTTP request to send the update to the server.

It was really easy – the interesting bit of the code looks like this…

(more…)

Where am I?

Thursday, April 12th, 2007

I first come across Plazes a few months ago. The idea is pretty neat – you update a service to let people know where you are.

I’m not a big fan of the implementation though. It’s too tied to using the network you’re connected to to identify where you are – which means it can’t seem to tell the difference between any IBM site in Europe. And as I spend the majority of my time connected to an IBM network, that leaves Plazes thinking that I’m somewhere in Germany half the time. Not very impressive.

It has an API which is always a good thing, but that won’t let you create any new ‘Plaze’ which it doesn’t already know about. Which makes it a little useless for many circumstances.

And it relies on me being at my laptop. This is a bit limiting as I don’t always have my laptop with me. What would be really cool would be a service which actually updates where I am. (Okay, so they have a mobile client, but that’s for Symbian only so that’s no use to me 🙂 )

With this in mind (and my newly rediscovered love for PHP after having to do some work on the SYA database on Tuesday), tonight I decided to have a go at knocking together a solution that would better suit my needs…

(more…)

I miss pine

Friday, March 2nd, 2007

Does anyone still use ‘pine’? We used to use it at my University, and I loved it.

For those who’ve not come across it before, Pine is a very nifty text-based email client. And (as I seem to be going through a nostalgic love for all things command-line based at the moment), I miss it.

With that in mind, for no reason in particular other than that my mind was wandering in a particularly boring meeting, I thought of creating a pine-inspired email client for myself. A bit like pine, but more task-oriented to fit in with my GTD approach to personal organisation.

(more…)

Getting Command Shell working on Windows Mobile 5

Tuesday, February 27th, 2007

Microsoft provide a command shell for Windows Mobile as a part of their Developer Power Tools package.

I fancied giving it a try tonight (for no particular reason other than that I like using the command line, and my phone has a full QWERTY keyboard) so followed the instructions to install it.

No luck – it didn’t work. No errors, it just didn’t work – nothing happened.

It took a bit of playing around with, but I’ve managed to get it running…

(more…)

Accessing Pocket Outlook email programmatically

Tuesday, February 6th, 2007

screenshotI mentioned ages ago about a little extension I wrote for my phone that lets me dump the contents of an email that I receive into any other bit of Pocket Outlook – turning an email about an event into a Calendar item, or an email asking me to do something into a Task item – with a single click.

I recently noticed a problem with it, and finally got around to looking into it tonight. The problem was that sometimes the body of the email wouldn’t make it to the new Calendar or Task item. Everything else, like the subject and the sender’s name would be fine, but the body of the new item would be blank.

(more…)