Summary
In this chapter, you learned how to incorporate platform-specific features within the TrackMyWalks
application, dependent on the mobile platform that is being run, as well as how to incorporate the Xam.Plugin.Geolocator
NuGet package within the shared-core project solution.
You also learned how to create a LocationService
Interface and Class, which included a number of class instance methods that our iOS and Android platforms will use to handle location-based features, like obtaining current GPS coordinates and handling location updates in the background on the device. You then updated the WalkEntryPageViewModel
and WalkDistancePageViewModel
classes to allow location-based features to happen and created a CustomMapOverlay
class that will be used to display a native Map
control, based on the platform. Lastly, you updated the WalkDistancePage.xaml
and the code-behind file to handle location updates as well as perform location updates in the background and update the native Map
control...