setDeviceName method

Future<bool> setDeviceName (String deviceName)

Requests a change of the name of the connected device.

Maximum size is 22 characters. Returns true if the request was successfully made, false otherwise

Implementation

static Future<bool> setDeviceName(String deviceName) async {
  assert(deviceName != null && deviceName.length < 22,
      'A non-null device name less than 22 characteres must be specified.');
  if (!connected) throw ESenseException('Not connected to any eSense device.');
  return await _eSenseManagerMethodChannel.invokeMethod('setDeviceName', <String, dynamic>{'deviceName': deviceName});
}