Book Image

Windows Phone 7.5 Application Development with F#

By : Lohith G N
Book Image

Windows Phone 7.5 Application Development with F#

By: Lohith G N

Overview of this book

Windows Phone is an OS which is also a platform in itself and provides an opportunity for application developers to build their apps and sell them on the Windows Phone Marketplace. Windows Phone is slowly catching up in the race with iOS and Android. Although well suited for scientific and mathematical calculations, the Windows Phone Platform provides an opportunity to program in F#. "Windows Phone 7.5 Application Development with F#"  focuses on making the user aware of Windows Phone App Development with the F# programming language in as short a time as possible. The book teaches you about the development environment, helps you understand the project structure, understand the controls, and ends with some of the cool features of the platform like sensors, launchers, and choosers. The book starts off with enabling the user with the right tools required to start developing. It focuses on getting the IDE ready, and project and item templates. By the end of the book the user will be familiarized with the different aspects of the platform itself. The transition from one chapter to another is short and focused so that you can get to the meat of the topic quickly.
Table of Contents (16 chapters)
Windows Phone 7.5 Application Development with F#
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Windows Phone Screen Orientations
5
Windows Phone Gesture Events
7
Windows Phone and Data Access
Index

GPS (location services)


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:

  1. Create a new project of the type F# Windows Phone Application (Silverlight). Give it a name.

  2. In the App project, right-click and add a reference to the System.Device assembly. The location service is provided in the System.Device.Location namespace.

  3. Add a couple of text blocks in MainPage.XAML. We will try...