public void NotifyTest() { try { DroidGattServer.NotifyCharacteristicChanged(_ConnectedDevice, _GattServices.GetFromUuid(BatteryService.BATTERY_SERVICE_UUID).GattCharacteristics.GetFromUuid(BatteryService.BatteryLevelCharacteristic.BATTERY_LEVEL_UUID).DroidCharacteristic, false); } catch (Exception e) { } }
public void SendResponse(IBluetoothDevice bluetoothDevice, int requestId, byte[] responseBytes) { //GattServer.DroidGattServer.SendResponse(device, requestId, GattStatus.Success, offset, Encoding.Default.GetBytes("XJSayHello"+requestId)); DroidGattServer.SendResponse((bluetoothDevice as BluetoothDeviceWrapper).DroidDevice, requestId, GattStatus.Success, 0, responseBytes); }