title: MvvmCross ILocationWatcher Success Action not firing - Android
body: <p>I'm trying to integrate the MvxGeolocation plugin for android and I'm having issues getting the watcher to fire the success event. It just does not fire.</p>
  
  <p>I've followed the documentation from <code>MvvmCross</code> (<a href="https://github.com/MvvmCross/MvvmCross/wiki/MvvmCross-plugins#location" rel="nofollow noreferrer">https://github.com/MvvmCross/MvvmCross/wiki/MvvmCross-plugins#location</a>).</p>
  
  <p>As per the documentation I've created a separate Service that publishes messages to the <code>ViewModel</code>, rather than have the <code>IMvxLocationWatcher</code> hooked directly up to the <code>ViewModel</code>.</p>
  
  <pre><code>public class GeoLocationService: IGeoLocationService
      {
          private readonly IMvxLocationWatcher _watcher;
          private readonly IMvxMessenger _messenger;
  
          public GeoLocationService(IMvxLocationWatcher watcher, IMvxMessenger messenger)
          {
              _watcher = watcher;
  
              _messenger = messenger;
  
              _watcher.Start(new MvxLocationOptions(), OnLocation, OnError);
          }
  
  
          public void OnLocation(MvxGeoLocation location)
          {
              var message = new LocationMessage(this, location.Coordinates.Latitude, location.Coordinates.Longitude);
  
              _messenger.Publish(message);
          }
  
          public void OnError(MvxLocationError error)
          {
              Mvx.Error("Seen location error {0}", error.Code);
          }
      }
  </code></pre>
  
  <p>The <code>OnLocation(MvxGeoLocation location)</code> method is meant to publish a message that my ViewModel subscribes too as you can see  below:-</p>
  
  <pre><code>public class MainViewModel : MvxViewModel
      {
  
          private readonly MvxSubscriptionToken _token;
          public MainViewModel(IMvxMessenger messenger)
          {
              _token = messenger.SubscribeOnMainThread&lt;LocationMessage&gt;(OnLocationMessage);
          }
  
  
  
   private void OnLocationMessage(LocationMessage locationMessage)
      {
          Lat = locationMessage.Lat;
          Lng = locationMessage.Lng;
      }
  
      double _latitude;
      public double Lat
      {
          get
          {
              return _latitude;
          }
          set
          {
              _latitude = value;
              RaisePropertyChanged(() =&gt; Lat);
  
          }
      }
  
  
      double _longitude;
      public double Lng
      {
          get
          {
              return _longitude;
          }
          set
          {
              _longitude = value;
              RaisePropertyChanged(() =&gt; Lng);
          }
          }
  
          string _name;
  
          public string Name
          {
              get
              {
                  return _name;
              }
              set
              {
                  _name = value;
                  RaisePropertyChanged(() =&gt; Name);
              }
          }
      }
  </code></pre>
  
  <p>I've added Bootstrapper classes to the android application that resolve both the Messenger and LocationWatcher plugins. Ive also registered the GeoLocationService in the App class in my core library like this :-</p>
  
  <pre><code>public class App : MvxApplication
      {
          public App()
          {
              Mvx.ConstructAndRegisterSingleton&lt;IGeoLocationService, GeoLocationService&gt;();
  
              Mvx.RegisterSingleton&lt;IMvxAppStart&gt;(new MvxAppStart&lt;MainViewModel&gt;());
          }
      }
  </code></pre>
  
  <p>I've also edited the AndroidManifest.Xml and added the following user permissions :-</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  </code></pre>
  
  <p>Im debugging this against a plugged in Device (Samsung S6 Edge).</p>
  
  <p>Ive tested my view.xaml to ensure that binding is working by passing it some default values.. and everything is as expected. </p>
  
  <p>The issue is that The Action in the Watcher class for Success or Error are never called.</p>