Showing posts from 2010

Windows Phone 7 – Tube Companion (Pre RTM)

Ive recently completed my Tube Companion application for Windows Phone 7.  The application was built with a pre-RTM version of the toolkit, but once the RTM version has been released then i’ll retest the code base, and barring any major breaking changes I should be good to go.The application itself is basically a tool to assist users who utilise the London Underground.  A complete list of functionality in this first release is as follows:Line Status - Live updates of the status of each of the tube lines.Tube Map - A version of the tube map with pinch/zoom enabled.Station lookup – Lookup every station on the London Underground network.Live Departure Boards – Display the live departure boards for certain tube station/tube line pairings. Stations Near Me – Shows the ten nearest stations to the user within a 10 mile radius,Tube This Weekend – Displays the planned disruptions to the tube lines/stations for the forthcoming weekend. Push Notifications – Push notifications can be enabled to a…

Windows Phone 7 - Selecting device photos without PhotoChooserTask

A common feature of mobile based applications is the ability to let you view photos that have been taken with the device. For Silverlight based Windows Phone 7 applications, this functionality would generally be achieved by utilising the PhotoChooserTask.

The PhotoChooser task navigates to the phones photo gallery section, allows the user to select a photo and then returns this photo to the calling application. Now this approach is fine for the majority of circumstances, but what happens if more flexibility is required by the application for image selection? In this case the MediaLibrary class can be utilised to retrieve images from the device, and then displayed in whichever way the application chooses.The following shows simple examples of both approaches.PhotoChooserTask ImplementationHere we have a very simple UI that contains a button to select a photo and a currently unassigned image control.The following code is then used to display the images on the phone.privatevoid butSel…

Windows Phone 7 - London Tube Companion Application

As part of my continual learning of Windows Phone 7, I decided to develop an application which displays the status of tube lines for the London Underground. As well as displaying the line status, the application also allows users to request push notifications when the status of a tube line changes.
Windows Phone 7 architecture allows for several types of push notifications, all of which are delivered by the cloud based Push Notification service. The notification types are as follows:
Raw Notification : Raw Data is sent to the application. Only available when the application is open.Tile Notification: If the application is pinned to the phone’s start screen, then the application’s tile can be modified.Toast Application: Text based notification is displayed to the currently active screen. This does not require the application to be open.In this example I decided to use toast notifications to inform the user of any changes to the tube line status, as it would allow the user to be inf…

Windows Phone 7 CTP April Refresh - Bing Maps Silverlight Control

The April refresh of the Windows Phone 7 CTP was released the other day, and for some reason the BingMapsTask has been removed from this release and im assuming that this had led to the Bing Maps Silverlight control not working.

Ive asked a few people on the dev team about a work around, but Ive yet to receive a response. Im guessing that it would simply be a case of adding a new capability to the WMAppManifest.xml file.


My assumption that the removal of the BingMapsTask being removed prevented the Silverlight control from working was incorrect.

As Ryan has stated below, it was merely the issue of the Authenticode Signed Assemblies failing to load, as detailed in Tim Heur's post

As Ryan correctly states, this workaround needs to be applied to
Microsoft.Maps.MapControl.dll and System.Windows.Browser, but it also needs applying to Microsoft.Maps.MapControl.Common

Apologies if my initial post misled anyone, it wasnt my intention.

Windows Phone 7 CTP - Events when the phone is locked

If you've seen my initial blog post regarding the development of a Jogging application for Windows Phone 7 then you'll have seen that I raised a concern about developing the application further.

Basically I was concerned that when the phone is locked, either manually or due to a lack of activity from the end user, that the application would go into a paused state thereby rendering this type of application useless. I asked this question to Peter Torr (Microsoft Program Manager), and unfortunately this is the current behavior. On a positive note he has stated that this area is still under investigation, so fingers crossed this may get resolved prior to launch.

My gut feeling is that this would be addressed as lucrative Sat Nav applications would also be affected by the same problem, unless there's a way to code around this.

The full response from Peter follows:

"Hi Andy,

The current builds pause the application when the phone locks (not that you can really lock the emulato…

Windows Phone 7 - Jogging Application Part 2

In an earlier blog, I produced a very basic application for Windows Phone 7 that allowed joggers to track their progress of a training session on a Bing Map. The application simply plotted a map polyline whenever there was a change in the device’s location, with the changes in the devices location being raised as events by the GeoCoordinateWatcher class, which is part of the Windows Phone 7 API.

Now although the user’s training session was plotted on the map, with the start and end points being identified with pushpins on the map, the application didn’t indicate to the user the total distance travelled, so to obtain this I decided to use the Route Service, which is one of the Bing Maps Web Services.

Route Service
As the name suggests, the route service is an API used to calculate routes between designated start and end points.

In order to use the Route service, a service reference to needs to be added to t…

Windows Phone 7 With Location Services And Bing Maps

Recently Microsoft released the CTP toolkit for Windows Phone 7, available here , and I decided to produce a small application which uses the location services functionality of the phone, as well as the Silverlight Bing Maps user control.

The application is aimed at joggers/runners, and simply allows users to start and end a running session and view their progress on a map. At the end of their session, the relevant start and end points are displayed on the map as pins, and the total time of the workout session along with total distance travelled is also displayed.

Location Services

Location services within Windows Phone 7 provides a location based api, which allows consumers to track their current geocoordinates, as well as the status of their location based device. It is worth noting that location services is not just GPS tracking, as the service can also determine a devices location from wireless networks, assisted gps etc.

One of the challenges of utilising Location Services with…