Posts Tagged ‘createthread’

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…)