void onBondStateChanged(MLBluetoothLE.Device device, MLBluetoothLE.BondState state) { print("onBondStateChanged"); if (state.Equals(MLBluetoothLE.BondState.Bonded)) { print("Device bonded!"); MLBluetoothLE.DiscoverServices(); } }
void onScanResult(MLBluetoothLE.Device device) { // print("Scan Result"); // print(device.Address); if (device.Address == KEYBOARD_ADDRESS) { print("Keyboard found!"); print(device.Name); print(device.DeviceType.ToString()); this.device = device; MLBluetoothLE.StopScan(); print("Attempting to connect"); MLBluetoothLE.GattConnect(device.Address); } }