notifyGattServerCharacteristic method
通过本地 GATT Server 主动通知/指示特征值。
参数:
deviceId:目标中心设备 ID,默认null表示尽量发给所有已连接/已订阅设备。 Android 支持指定设备;iOS/macOS 当前忽略该参数并发给已订阅中心设备;Linux/Windows/Web 返回false。serviceUuid:本地服务 UUID,无默认值。characteristicUuid:本地特征 UUID,无默认值。value:要发送的字节数组,无默认值。confirm:是否使用需要确认的 indication,默认false。Android 支持;iOS/macOS 当前忽略; Linux/Windows/Web 返回false。需要可靠送达时可设为true,高频数据推荐保持false。
Implementation
Future<bool> notifyGattServerCharacteristic({
String? deviceId,
required String serviceUuid,
required String characteristicUuid,
required List<int> value,
bool confirm = false,
}) {
throw UnimplementedError(
'notifyGattServerCharacteristic() has not been implemented.',
);
}