Book Image

Windows Phone 7.5: Building Location-aware Applications

Book Image

Windows Phone 7.5: Building Location-aware Applications

Overview of this book

Windows Phone 7.5 has met with some great initial reviews from all mobile critics. It is poised to be the '3rd' eco-system for mobile, joining Apple's iOS and Google's Android platform. With Microsoft and Nokia working on multiple devices based on Windows Phone, the platform is a no-brainer enterprise success. Microsoft Office, Email, Skype and a fresh new mobile operating system has been a great champion of a cause for both Microsoft and Nokia. "Windows Phone 7.5: Building Location-aware Applications" will teach you to divein to the new Windows Phone Experience. No more 600 page bibles - just the right mix of text and lots of code to get you started!"Windows Phone 7.5: Building Location-aware Applications" covers location based services and maps, and focuses on methods of location detection and maps. Powered with this information, two real-world applications are covered. In short, this is a concise book on building location aware apps for Windows Phone.
Table of Contents (11 chapters)
Windows Phone 7.5: Building Location-aware Applications
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Windows Phone Location Service


Location information in your Windows Phone applications is managed by the Windows Phone Location Service, which allows you to use your device's Wi-Fi, GPS, or cellular network to determine location. As we discussed earlier, Microsoft lays strong emphasis on location, so much that it is a basic hardware requirement for all Windows Phones.

The main class that handles the Location Service is the GeoCoordinateWatcher class. Perform the following steps and make sure you import the DLL in your solution:

  1. 1. Create a new Windows Phone Application project in Microsoft Visual Studio 2010 Express for Windows Phone by selecting the Visual C# template. Name it PhoneApp1 as shown in the following screenshot:

  2. 2. Now select your project name in Solution Explorer, and add the System.Device reference as shown in the following screenshot:

  3. 3. In your MainPage.xaml.cs file import the following location namespace by using the using keyword:

    using System.Device.Location;
    

    Note

    Downloading...