示例#1
0
 public GeolocationServiceConnection(GeolocationServiceBinder binder)
 {
     if (binder != null)
     {
         Binder = binder;
     }
 }
 public GeolocationServiceConnection(GeolocationServiceBinder binder)
 {
     if (binder != null)
     {
         Binder = binder;
     }
 }
示例#3
0
        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();
        }