public GeolocationServiceConnection(GeolocationServiceBinder binder) { if (binder != null) { Binder = binder; } }
public void OnServiceConnected(ComponentName name, IBinder service) { var serviceBinder = service as GeolocationServiceBinder; if (serviceBinder == null) { return; } Binder = serviceBinder; Binder.IsBound = true; // raise the service bound event ServiceConnected?.Invoke(this, new ServiceConnectedEventArgs { Binder = service }); // begin updating the location in the Service serviceBinder.Service.StartLocationUpdates(); }
public void OnServiceConnected(ComponentName name, IBinder service) { var serviceBinder = service as GeolocationServiceBinder; if (serviceBinder == null) return; Binder = serviceBinder; Binder.IsBound = true; // raise the service bound event ServiceConnected?.Invoke(this, new ServiceConnectedEventArgs {Binder = service}); // begin updating the location in the Service serviceBinder.Service.StartLocationUpdates(); }