updateSession static method
- @Deprecated('This function is deprecated, please use "updateSession" of Countly.instance.sessions instead')
Update session for manual session handling. This method needs to be called for updating a session only if manual session handling is enabled by calling the 'enableManualSessionHandling' method of 'CountlyConfig'. returns the error or success message
Implementation
@Deprecated('This function is deprecated, please use "updateSession" of Countly.instance.sessions instead')
static Future<String?> updateSession() async {
if (!_instance._countlyState.isInitialized) {
String message = '"initWithConfig" must be called before "updateSession"';
log('updateSession, $message', logLevel: LogLevel.ERROR);
return message;
}
log('Calling "updateSession", manual session control enabled:[$_manualSessionControlEnabled]');
if (!_manualSessionControlEnabled) {
String error = '"updateSession" will be ignored since manual session control is not enabled';
log(error);
return error;
}
final String? result = await _channel.invokeMethod('updateSession');
return result;
}