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. 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. Now select your project name in Solution Explorer, and add the
System.Device
reference as shown in the following screenshot:3. In your
MainPage.xaml.cs
file import the following location namespace by using theusing
keyword:using System.Device.Location;
Note
Downloading...