Creating and implementing the ILocationService interface

In this section, we'll take a look at how to create the ILocationService class, which will essentially contain various instance methods that will be used by our LocationService class. The advantage of creating an ILocationService class is that it's much easier to add additional class instance methods that will be used by those ViewModels and ContentPages (Views) that utilize this interface.

Let's start by creating the ILocationService interface for our TrackMyWalks app by performing the following steps:

  1. Ensure that the TrackMyWalks solution is open within the Visual Studio for Mac IDE.
  2. Next, right-click on the Services folder, and choose Add|New File... from the pop-up menu, as shown ...

Get Mastering Xamarin UI Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.