Beispiel #1
0
        private void EnableBluetooth()
        {
            var adapter = BluetoothHelper.ObtainBluetoothAdapter(this);

            if (!adapter.IsEnabled)
            {
                adapter.Enable();
            }
        }
Beispiel #2
0
        private void DisableBluetooth()
        {
            var adapter = BluetoothHelper.ObtainBluetoothAdapter(this);

            if (CanDisableBluetooth(adapter))
            {
                adapter.Disable();
            }
        }