Xamarin.Forms DependencyService difficulty getting location
问题 So after finally getting my head around Xamarin.Forms DependencyService I have nearly got it returning the device's current location. my interface public interface ICurrentLocation { MyLocation SetCurrentLocation(); } MyLocation public class MyLocation { public double Latitude {get; set;} public double Longitude{get; set;} } the line that calls it MyLocation location = DependencyService.Get<ICurrentLocation>().SetCurrentLocation(); and in the CurrentLocation class in the Android project that