startAdvertising method
Future<void>
startAdvertising(
- AdvertisingMode advertisingMode,
- AdvertisingTxPower advertisingTxPower,
- Guid uuid,
- int manufacturerId,
- Uint8List manufacturerData,
The list of connected peripherals can include those that are connected by other apps and that will need to be connected locally using the device.connect() method before they can be used.
Implementation
// Stream<List<BluetoothDevice>> connectedDevices({
// List<Guid> withServices = const [],
// }) =>
// throw UnimplementedError();
Future<void> startAdvertising(
AdvertisingMode advertisingMode,
AdvertisingTxPower advertisingTxPower,
Guid uuid,
int manufacturerId,
Uint8List manufacturerData,
) async {
final settings = protos.AdvertisingSettings.create()
..advertisingMode = advertisingMode.value
..advertisingTxPower = advertisingTxPower.value
..manufacturerId = manufacturerId
..manufacturerData = manufacturerData
..serviceUuid = uuid.toString();
await _channel.invokeMethod('startAdvertising', settings.writeToBuffer());
}