Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Windows Phone 7.5: Building Location-aware Applications

You're reading from  Windows Phone 7.5: Building Location-aware Applications

Product type Book
Published in Jul 2012
Publisher Packt
ISBN-13 9781849687249
Pages 148 pages
Edition 1st Edition
Languages

Table of Contents (11) Chapters

Windows Phone 7.5: Building Location-aware Applications
Credits
About the Author
About the Reviewers
1. www.PacktPub.com
2. Preface
1. The Location-based World 2. Using Location in Windows Phone 7.5 3. Using Maps in your Windows Phone App 4. Events App - PacktEvents 5. Location-aware News App — PacktNews

How Microsoft uses LBS in Windows Phone 7.5


Microsoft's Windows Phone 7.5 (Mango) is a fresh new approach to mobile operating systems and user interfaces. In fact Microsoft has got good reviews from every quarter of the mobile phone world. What's different with Windows Phone is the emphasis on an integrated user experience rather than apps. The Metro user interface is clean, engaging, exciting, and different. Keeping the interface relevant and inclusive for the users, Microsoft has kept location as a compulsory hardware requirement for all Windows Phone handset manufacturers. This also signifies the important role of location in current and future Windows Phones. See Hardware Specifications for Windows Phone at:

http://msdn.microsoft.com/en-us/library/ff637514(v=vs.92).aspx)

Let us now understand how Microsoft uses LBS in Windows Phone 7.5. As we learnt earlier, all WP7.5 phones have A-GPS and Wi-Fi capabilities built in the phone. This coupled with the Microsoft Location Service completes the location hardware and software required to build our location-aware apps!

Microsoft Location Service

In order to use the location APIs in your WP7.5 application, you need to include the System.Device.Location assembly in your application. Before you can use location in your app, make sure your device has location enabled; if not, you can enable it from the SETTINGS page on your WP7.5 Phone, as shown in the following screenshots from our Nokia Lumia 800:

The GeoCoordinateWatcher class is the class which exposes the Windows Phone Location Service. It contains methods for both:

  • Getting location information on demand

  • Sending location information on position change or status change

Lastly, as with all mobile phone platforms, Microsoft has bundled an excellent location sensor simulator with the Windows Phone 7.1 SDK, which can be used to simulate location via live real-time values as well as saved values as shown in the following screenshot:

You have been reading a chapter from
Windows Phone 7.5: Building Location-aware Applications
Published in: Jul 2012 Publisher: Packt ISBN-13: 9781849687249
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}