updateSessionInterval static method

  1. @Deprecated('Use setUpdateSessionTimerDelay of CountlyConfig instead')
Future<String?> updateSessionInterval(
  1. int sessionInterval
)

Sets the interval for the automatic session update calls min value 1 (1 second), max value 600 (10 minutes) int sessionInterval- delay in seconds

Implementation

@Deprecated('Use setUpdateSessionTimerDelay of CountlyConfig instead')
static Future<String?> updateSessionInterval(int sessionInterval) async {
  log('Calling "updateSessionInterval":[$sessionInterval]');
  log('updateSessionInterval is deprecated, use setUpdateSessionTimerDelay of CountlyConfig instead', logLevel: LogLevel.WARNING);
  if (_instance._countlyState.isInitialized) {
    log('updateSessionInterval should be called before init', logLevel: LogLevel.WARNING);
    return 'updateSessionInterval should be called before init';
  }
  List<String> args = [];
  args.add(sessionInterval.toString());

  final String? result = await _channel.invokeMethod('updateSessionInterval', <String, dynamic>{'data': json.encode(args)});

  return result;
}