startBleAdvertising method

  1. @override
Future<void> startBleAdvertising(
  1. String ssid,
  2. String psk
)
override

Starts BLE advertising with the provided Wi-Fi hotspot credentials.

This allows BLE clients to discover the hotspot's SSID and PSK.

  • ssid: The network name (SSID) to advertise.
  • psk: The password (Pre-Shared Key) to advertise. Requires necessary Bluetooth permissions. Returns a Future that completes when advertising is started.

Implementation

@override
Future<void> startBleAdvertising(String ssid, String psk) async {
  await methodChannel.invokeMethod(
    'ble#startAdvertising',
    {'ssid': ssid, 'psk': psk},
  );
}