getCurrentDeviceId static method

Future<String?> getCurrentDeviceId()

Get currently used device Id. Should be call after Countly init

Implementation

static Future<String?> getCurrentDeviceId() async {
  log('Calling "getCurrentDeviceId"');
  if (!_instance._countlyState.isInitialized) {
    String message = '"initWithConfig" must be called before "getCurrentDeviceId"';
    log('getCurrentDeviceId, $message', logLevel: LogLevel.ERROR);
    return message;
  }
  final String? result = await _channel.invokeMethod('getCurrentDeviceId');

  return result;
}