MatchDay Windows Phone 7 Application


A while back I switched over to a HTC HD7 running Windows Phone 7 (I have since switched back to an iPhone 4 but that’s another story). When I had an iPhone I had this handy application that aggregated news items for my favourite football team (Millwall FC) and sent push notifications when new news items arrive.

I couldn’t find anything similar in the Windows Marketplace so I decided as an experiment in learning the Windows Phone 7 platform I would go ahead and build my own application.

Version 1.0

The first incarnation of the app basically allowed a user to select their football team and then presented them with three views, one with news items for their team, one with news items about football in general and one with news items about sport in general. As a note all the feeds were coming from the BBC as RSS.

Version one looked like this:

There we a couple of things I had to do, first create a wrapper library and domain model to encapsulate the web requests to the feeds and second to parse the feeds once I had them. I used the RSS.Net open source library to do the RSS parsing which presented a couple of issues. One was that I needed to reference this library from the Windows Phone application so I needed to do some work around changing the framework version of the project and then sorting out and replacing all the references an classes that didn’t exist in the Windows Phone libraries. I also had to modify the RSS.Net code to work with some quirks of the BBC feed, namely their media elements for images.

Once that was done it was matter of presenting the news items to the UI, for this I used a simple Panorama view with a grid and list. When a user clicked through to read more on the news item I simply navigated them to the BBC website within the application using the browser control.

As for keeping track of the teams and which leagues they are in I used a simple XML file embedded into the application that stored the relevant information (this needs to be updated every season).

Version 2.0

Version 1.0 was released a got a few downloads but I kind of abandoned it for a while and did no new development on it. One of the things I really wanted to support was push notifications so I picked up the project again and started implementing the push notification service.

I started by creating a WCF web service that handles registering the user for subscriptions then allowing them to subscribe to updates with their favourite team. I then implemented a simple console application that runs alongside the web service checking for new news items in every feed in the team XML file. This then stored the latest news item and sent a push notifications to all subscribers when it found a new story.

I then implemented a notification client in the Windows Phone application that handled calling the web service and registering the subscriber to notifications for their team. When there is a new news story for their team they will get a toast notification and update icon on their start page:

There is one thing to note here, I reused the BBC feed wrapper I wrote that encapsulates the web request and logic for parsing the RSS feeds, however I needed to maintain to separate projects, one for the Windows Phone application and one for the web service as they both target different frameworks.

If you want to learn more about push notifications the the MSDN site does a lot better job than I could here http://msdn.microsoft.com/en-us/library/ff402558(v=vs.92).aspx

There you have it, MatchDay is my first Windows Phone application, its currently at version 2.2 and you can download it now from the Windows Marketplace.

I plan to make a Windows 8 Metro application next then a Android and iOS version (if I get round to it all).

Would love to hear any feedback.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s