March 2018
Intermediate to advanced
192 pages
4h 4m
English
Now that we have an interface that defines our location service, we can use it in the core project of our TripLog app. The main place we will need to capture location in the app is on the new entry page, so coordinates can be attached to log entries when they are added. Since we want to keep our app logic separate from the user interface, we will use the location service in the new entry page's ViewModel, and not on the page itself.
In order to use the ILocationService interface in the NewEntryViewModel, perform the following steps:
public class NewEntryViewModel : BaseViewModel { readonly ...