getAdvertisementAndConnectionInterval method

Future<bool> getAdvertisementAndConnectionInterval()

Requests a read of the parameter values of advertisement and connection interval of the connected device.

The event AdvertisementAndConnectionIntervalRead is fired when the parameter values has been read. Returns true if the request was successfully made, false otherwise.

Implementation

Future<bool> getAdvertisementAndConnectionInterval() async {
  if (!connected) {
    throw ESenseException('Not connected to any eSense device.');
  }
  return await _eSenseManagerMethodChannel
          .invokeMethod<bool?>('getAdvertisementAndConnectionInterval') ??
      false;
}