getDeviceName method

Future<bool> getDeviceName()

Requests a read of the name of the connected device.

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

Implementation

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