Adding the plugin geolocator NuGet package to our solution

In this section, we will begin by adding the Xam.Plugin.Geolocator NuGet package to our TrackMyWalks shared-core solution, which is essentially a cross-platform library that you can use to obtain current device GPS location coordinates, as well as perform location updates within the background by writing a few lines of code to access the various Properties and Methods available within this class.

Let's start by adding the Xam.Plugin.Geolocator NuGet package to our TrackMyWalks app by performing the following the steps:

  1. Right-click on the Dependencies|NuGet folder, located within the TrackMyWalks solution, and choose the Add Packages... menu option, as you did in Chapter 4, Creating the TrackMyWalks Native app.
  1. Next, within the Search field located within the Add Packages dialog, you need to enter in Plugin.Geolocator and select the Xam.Plugin.Geolocator option within the list, as shown in the following screenshot:
Adding the Xam.Plugin.Geolocator NuGet Package
  1. Then, make sure that you choose the latest version to install from the dropdown list for the Version field (this will be displayed by default).
  2. Finally, click on the Add Package button to add the Xam.Plugin.Geolocator NuGet package to the TrackMyWalks shared-core solution.

Now that you have added the NuGet package for the Xam.Plugin.Geolocator, we can begin utilizing this control by creating a LocationService Interface and Class that will be used by our ViewModels and ContentPages (Views).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.135.80