public GeofencingServiceConnection(GeofencingServiceBinder binder)
 {
     if (binder != null)
     {
         Binder = binder;
     }
 }
        public void OnServiceConnected(ComponentName name, IBinder service)
        {
            var serviceBinder = service as GeofencingServiceBinder;

            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.StartGeofencingUpdates();
        }