Posts Tagged ‘windows mobile’

Palm Treo Pro

Tuesday, September 30th, 2008

I’ve had a Treo Pro for a couple of weeks now so I thought I’d write a post about what I think of it.

If you’re the sort who likes to skip to the end of stories, let me save you a little time. I’m loving it. It’s awesome.

I’ll try and explain why in this post.

(more…)

GPS Intermediate Driver for Windows Mobile (and getting it to work!)

Monday, August 25th, 2008

My last two Windows Mobile phones have both had GPS, so I’ve played with code to get my location from the GPS a few times. These have generally been quick hacked-together bits and pieces. In all of them, I wrote my own GPS code. I knew that the GPS device would be accessible through a serial port, so I just connected to the relevant COM port and started reading. It’s easy to parse – NMEA sentences are written with an update on each line, in comma-separated strings.

After sharing my OpenCellId client last week, I was encouraged to try rewriting the GPS code for it using the Windows Mobile GPS Intermediate Driver. So I had a quick try. I was vaguely aware of it before, but hadn’t taken a proper look. In this post, I’ll describe briefly what it is, it’s benefits over home-grown hacks such as my own, and share a couple of things that I had to do to get it to work.

(more…)

Improving TwitToday – more Today Screen coding

Wednesday, July 23rd, 2008

Twitter client for Windows MobileApart from adding the ability to initiate an internet connection, my Twitter widget for Windows Mobile Today screens is still virtually the same code as I wrote in a few hours overnight at the Over The Air hackday.

Which isn’t great – as I know there have been a bunch of people waiting for me to make some fixes and add some basic features.

Tonight I had a bit of time to spare, so I finally dug out the code to start making a few improvements:

  • Background worker thread
    Today screen widgets are compiled into DLLs. They aren’t a separate executable, and are run by the Today Screen in the Today screen’s (i.e. explorer.exe’s) flow of execution. When the code tries to post to twitter.com, explorer can’t do anything else until that’s finished.

    That might even be tolerable with most websites, but with twitter – which is known to fall over from time to time! – it means TwitToday could effectively hang your phone for ages until the HTTP post timed-out.

    Not good. Now it does all the HTTP work in a background thread, so you can get on with other stuff while it tries to send your tweet.

  • SIP support
    This was asked for a lot. The Today screen doesn’t include the button to show/hide the on-screen stylus/finger keyboard. So if your mobile doesn’t have a keyboard, TwitToday wasn’t much use.

    I’ve added a setting now that lets you programmatically show the SIP keyboard when you tap on the text box.

If you want to try the new version, you can download it from here. If you want to see how I did it, read on.

(more…)

Apps I install on my phones

Sunday, June 8th, 2008

I noticed a thread running on Jason Langridge’s blog about “What are the first 10 applications you install on your phone?“, and thought I’d join in.

As always, conciseness is not my strong point – instead of trying to figure out which would be the first ten apps I’d install, I’ve ended up listing all the Windows Mobile apps I use regularly. (Ah well, if nothing else, it’ll be useful to have all the links in one place the next time I have to hard-reset one of my devices!)

I’ve tried to sort the list roughly in order of how much I use the apps.

(more…)

Capturing Bluetooth events in Windows Mobile

Friday, May 30th, 2008

I wrote on Sunday about writing Bluetooth code for Windows Mobile for a location-based reminder app I hacked together.

At the time, I wrote about two main approaches for finding nearby Bluetooth devices:

  • searching for discoverable devices
  • registering for notifications for when paired devices connect and
    disconnect

For the location-based reminder app, I went with the first approach, and played with how to search for discoverable devices.

This afternoon, I tried out the other way – writing an app that registers with the OS for connect and disconnect notifications from paired devices.

(more…)

Writing C++ code to run from C# for .NET Compact Framework

Sunday, May 25th, 2008

I mentioned earlier that I decided to write a DLL in C++ to invoke from my C# app for Windows Mobile. I’d not done this before, so thought I’d jot down a few quick notes about it.

I found a few detailed articles about this on MSDN that made for a good introduction to the topic:

There is a ton of information in these articles, so there isn’t much to add. Instead, I’ll give a quick, high-level overview.

(more…)

Programmatically searching for nearby Bluetooth devices in Windows Mobile from C#

Sunday, May 25th, 2008

As part of my plan to write a location-based reminder app using Bluetooth devices, I need a way to know what bluetooth devices are near me.

I’ve not done any Bluetooth development before, so I’ve had to learn a few new bits and pieces tonight.

(more…)

Custom properties in Outlook Mobile

Sunday, May 25th, 2008

As part of my plan to write a location-based reminder app using Bluetooth devices, I need a way to assign tasks to people, and people to specific Bluetooth device IDs.

I’ve decided to do this using custom properties in Outlook Mobile – the default PIM that comes on all Windows Mobile smartphones and PDAs.

I’ve not used this API before, but after a little playing, I’m impressed with how straightforward it all is.

The idea is that items in the Outlook Mobile PIM have pre-defined properties – so Contacts have fields such as ‘First Name’, or ‘Postcode’. But you can programmatically add new fields, and then store whatever you want in them.

For my purposes, I can add a “Bluetooth Device IDs” property to Contact items in my address book. I can also add pointers to Contact items to Task items in my to do list.

As this is just meant as a quick hack / proof-of-concept, I’m doing this in C#. The code looks something like this:

(more…)