Last active
December 13, 2019 05:06
-
-
Save marqzosvaldo/150f24900c243bb01ee33105a8841e18 to your computer and use it in GitHub Desktop.
Evento Estado de Bluetooth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ble.StateChanged += (s, e) => { | |
try { | |
switch (_ble.State) { | |
case BluetoothState.On: | |
page.DisplayAlert("Bluetooth Activado ", "Escaneando...", "OK"); | |
ScanDevicesCommand.Execute(null); | |
break; | |
case BluetoothState.Off: | |
page.DisplayAlert("Bluetooth Desactivado", $"Activa tu bluetooth en configuraciones", "OK"); | |
SelectionMode = SelectionMode.None; | |
break; | |
} | |
} catch (Exception ex) { | |
Debug.WriteLine(ex); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment