App Hub

article details

Recipe: Windows Phone GPS Emulator

Submitted
1/28/2011
Article

All Windows Phone devices have built-in Assisted GPS (aGPS), which is used by various phone applications including maps, camera, and search (to provide location-based search results).

Developers can access location information on Windows Phone by using the System.Device.Location namespace, which is supported in .NET 4 and later. The GeoCoordinateWatcher class supplies location data based on latitude and longitude coordinates. The Windows Phone GPS Emulator (a small WPF application) and one WP7 DLL enable you to create complex paths that you can play back just as if you were driving or walking, then debug your application on the emulator or a real device without leaving the comfort of your home or office.

Once you’ve completed your testing and debugging, you only need to change a single line of code to switch the device back to real GPS.

The Recipe includes:

  • The Windows GPS Emulator application
  • The Windows Phone GPS Emulator Client DLL
  • A simple Windows Phone Test client
  • An end-to-end Windows Phone App using Bings maps (a more complex sample)
For more detail on Windows Phone recipes in general, see this post on the the Windows Phone Developer Blog.

All content and source code downloaded from this page are bound to the Microsoft Permissive License (Ms-PL).

    downloads

    find education content
    var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
    DCSIMG