Пример #1
0
 private void OnConnectionChanged(ProfileState profileState)
 {
     DialogView.CloseDialog(this);
     if (profileState == ProfileState.Disconnected)
     {
         FinishActivity(123);
     }
 }
Пример #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.ServiceListView);

            DialogView.ShowDialog("Discovering services...", this);
            BluetoothClient.Instance.ConnectionHandler.DiscoverServices(status =>
            {
                if (status == GattStatus.Success)
                {
                    DialogView.CloseDialog(this);
                    RunOnUiThread(() => ShowServicesAndCharacteristics(BluetoothClient.Instance.ConnectionHandler));
                }
                else
                {
                    DialogView.ShowDialog("Failed to discover. Return and try again", this);
                }
            });
        }