public TestServiceWrapper(IBluetoothManager bluetoothManager) { IGattServiceBuilder builder = bluetoothManager.NewGattServiceBuilder(); builder.SetUuid(SERVICE_UUID).SetServiceType(GattServiceType.Primary); TestCharacteristicWrapper = new TestCharacteristicWrapper(bluetoothManager); KeepNotifyingCharacteristicWrapper = new KeepNotifyingCharacteristicWrapper(bluetoothManager); builder.AddCharacteristics(TestCharacteristicWrapper.GattServerCharacteristic); builder.AddCharacteristics(KeepNotifyingCharacteristicWrapper.GattServerCharacteristic); GattServerService = builder.Build(); }
public BatteryServiceWrapper(IBluetoothManager bluetoothManager) { IGattServiceBuilder builder = bluetoothManager.NewGattServiceBuilder(); builder.SetUuid(BATTERY_SERVICE_UUID).SetServiceType(GattServiceType.Primary); BatteryLevelCharacteristicWrapper = new BatteryLevelCharacteristicWrapper(bluetoothManager); builder.AddCharacteristics(BatteryLevelCharacteristicWrapper.GattServerCharacteristic); GattServerService = builder.Build(); }