Skip to Main Content
Mobile Development with C#
book

Mobile Development with C#

by Greg Shackles
May 2012
Intermediate to advanced content levelIntermediate to advanced
174 pages
4h 21m
English
O'Reilly Media, Inc.
Content preview from Mobile Development with C#

Using Location Data

All three platforms expose robust APIs that allow you to easily tap into the user’s current location within your applications. Despite the fact that all three of these APIs are independent of one another, there are many things they have in common, both in how they obtain the data and best practices for how to approach designing your application.

There are three sensors available for devices to determine the current location:

  1. Cellular signal

  2. Wi-Fi connection

  3. GPS signal

These sensors are listed in increasing order of accuracy, so GPS provides the finest level of precision and cellular signal the coarsest. Naturally, this has implications for how you should approach building your apps in order to provide the best possible user experience.

Accuracy

As is often the case, with great power comes great impact on battery life. When designing a location-aware application, you should think about the level of accuracy you need in the user’s location. Obtaining finer location information requires using more accurate sensors, which in turn consumes more power. For example, if you were building a weather application you might only care about the region a user was in rather than the street she is standing on. As such, there is no need to fire up the expensive GPS sensor when a cheaper one will suffice.

Frequency

Along the same lines, another thing to keep in mind is how often you need location updates. You can think of this frequency not just in terms of a polling time interval but also ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mobile Development with .NET - Second Edition

Mobile Development with .NET - Second Edition

Can Bilgin
Professional Cross-Platform Mobile Development in C#

Professional Cross-Platform Mobile Development in C#

Scott Olson, John Hunter, Ben Horgen, Kenny Goers

Publisher Resources

ISBN: 9781449338282Supplemental ContentErrata Page