コード例 #1
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);
                }
            });
        }
コード例 #2
0
 private void ShowDialog(string message)
 {
     DialogView.ShowDialog(message, this);
 }