示例#1
0
        public void OnServiceConnected(ComponentName name, IBinder service)
        {
            LocationServiceBinder serviceBinder = service as LocationServiceBinder;

            if (serviceBinder != null)
            {
                this.binder         = serviceBinder;
                this.binder.IsBound = true;
                Log.Debug("ServiceConnection", "OnServiceConnected Called");
                this.ServiceConnected(this, new ServiceConnectedEventArgs()
                {
                    Binder = service
                });

                serviceBinder.Service.StartLocationUpdates();
            }
        }