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

Chapter 1. The Location-based World

Location-based services (LBS) are pioneering and revolutionary services that have taken the Internet world by storm. The exponential growth of smartphones has led to increased demands for location-aware apps. The popular technology news blog Gigaom.com predicts that by the year 2016, LBS will be worth $10 billion. You can read the full report at:

http://gigaom.com/2011/06/09/location-based-services-worth-10b-by-2016/

Location-based services are a revolutionary, yet still fresh-from-the-oven, breed of services that have grown tremendously to carve themselves a new industry in just a few years. LBS is the next stage of evolution for search, on the Web and mobile, adding the location context (where am I or things around me?) to search. To quote from Wikipedia on the definition of LBS:

"A location-based service (LBS) is an information and entertainment service, accessible with mobile devices through the mobile network and utilizing the ability to make use of the geographical position (read Geocodes or Latitude / Longitude) of the mobile device."

You may have already used LBS when you use Twitter, Facebook, or when you visit hyperlocal web pages such as CitySeekr.com, Yelp.com, Qype.co.uk, and Eventful.com to find the top venues in the city or events happening in your city. Want to know how location is determined? Continue reading the chapter to understand the different methods of location detection, and which one is the right choice for you.

In this chapter we shall understand:

  • Location-based services

  • Buzzwords in the LBS industry

  • Applications of LBS and common use cases

  • How Microsoft uses LBS in Windows Phone 7.5 devices

  • Global Positioning System (GPS)

  • Indoor and outdoor navigation with GPS

Understanding location-based services

The concept of location-based services refers to services that integrate a mobile device's location with other topical information, to provide additional value to users. Consider a weather app that shows weather information for all of the United States of America cities. For a user living in San Francisco, this behemoth of information is not very helpful unless he can see the exact weather information for his city. This is achieved by mashing up the weather information with the user's location (generally obtained using a GPS system).

Another example of LBS is local search websites such as CitySeekr.com that presents a user with hyperlocal (read local, nearby, or neighborhood-centered) information about hotels, restaurants, shopping and entertainment venues that makes the user feel connected with the type of information shown to him/her. Still another example is the integrated Bing search in your Windows Phone 7.5 based phone (Nokia Lumia 800 in our case), which fetches the search request for hotels in san francisco with the location angle as well as regular web and image search, as shown in the following screenshot:

The core requirement for LBS is GPS (this will be covered in more detail shortly), a space-based satellite navigation system developed and maintained by the United States of America. Other countries also have similar systems; Russia has the Russian Global Navigation Satellite System (GLONASS) and Europe has the Galileo positioning system. India and China are working on their own positioning system as well, but GPS remains the most popular and preferred choice for device makers and application developers worldwide.

Anyone can use GPS freely by using either a Personal Navigation Device (Garmin, TomTom), an in-car navigation system (Ford SYNC), or using a smartphone.

On the mobile front, LBS also uses Bing, Google Maps, and other cartographic API services extensively (even in cases where the device does not support GPS). This is done using rich map data and geocoding services. Using geocoding and smart algorithms, a user's position can be guessed or approximated. Mobile operating systems such as Windows Phone 7.5 further the cause of LBS by integrating location into the core OS, where the location can be fetched, used, and updated by all applications.

Microsoft Windows Phone 7.5 (code name Mango) supports a Location Service Architecture that can obtain location data from the cellular network, Assisted GPS (A-GPS) that uses the network's data connection in case of weak GPS signals, as well as Microsoft's own Wi-Fi location database providing developers with a plethora of location tools and APIs to work with.

In short, LBS can be described as a combination of two services: location providers and location consumers, with GPS, A-GPS, and Windows Phone 7.5 Location API as the location providers, and GPS receivers, Windows Phone 7.5 devices, and websites as the consumers of location data.