MVVMCross Location Watcher Cirrious.CrossCore.Exceptions.MvxException: Location Manager not started

JoeHonourJoeHonour GBMember
edited September 2015 in Cross Platform with Xamarin

Hey guys,

when i try and start a location watcher in my main PCL i get this error message when i investigate the _watcher.start method.

CurrentLocation Cirrious.CrossCore.Exceptions.MvxException: Location Manager not started

does anyone know how to solve this?

My Code:
public class LocationService : ILocationService { private readonly IMvxLocationWatcher _watcher; private readonly IMvxMessenger _messenger; public LocationService (IMvxLocationWatcher watcher, IMvxMessenger messenger) { _watcher = watcher; _messenger = messenger; _watcher.Start (new MvxLocationOptions (), OnLocation, OnError); } private void OnLocation(MvxGeoLocation location) { var message = new LocationMessage (this, location.Coordinates.Latitude, location.Coordinates.Longitude); _messenger.Publish (message); } private void OnError(MvxLocationError error) { } }

Sign In or Register to comment.