Skip to Content
Mastering Xamarin.Forms - Second Edition
book

Mastering Xamarin.Forms - Second Edition

by Ed Snider
March 2018
Intermediate to advanced content levelIntermediate to advanced
192 pages
4h 4m
English
Packt Publishing
Content preview from Mastering Xamarin.Forms - Second Edition

Creating a location service

The first step to allowing our app to take advantage of the device's geolocation capabilities, is to provide an interface in the core library that can be used by the ViewModels in a device- and platform-agnostic manner. When receiving the geolocation back from a device, each platform could potentially provide coordinates in a platform-specific data structure. However, each structure will ultimately provide two double values representing the coordinate's latitude and longitude.

There are a couple of ways to ensure that the results are returned in a platform-agnostic manner, which we will need since we are working in a non-platform-specific library.

One way to ensure this is to pass the values back via a callback ...

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

Mastering Xamarin.Forms - Third Edition

Mastering Xamarin.Forms - Third Edition

Ed Snider
Xamarin.Forms Projects - Second Edition

Xamarin.Forms Projects - Second Edition

Daniel Hindrikes, Johan Karlsson
Xamarin.Forms Projects

Xamarin.Forms Projects

Johan Karlsson, Daniel Hindrikes

Publisher Resources

ISBN: 9781788290265Supplemental Content