The Windows Phone operating system contains location service, which allows us to build location-aware applications. The service makes use of sensors, such as a GPS receiver, Wi-Fi, and cellular radio, which makes up the hardware on the device, to provide the location information. The location service can use GPS, Wi-Fi, or cellular radio to deduce the location while balancing the power-utilization performance. Location service exposes the phone's current longitude, latitude, altitude, speed of travel, and heading through the System.Devices.Location
namespace.
Let's create a demo app to work with the location service. The following steps will help you create the demo:
Create a new project of the type F# Windows Phone Application (Silverlight). Give it a name.
In the App project, right-click and add a reference to the
System.Device
assembly. The location service is provided in theSystem.Device.Location
namespace.Add a couple of text blocks in
MainPage.XAML
. We will try...