Stopping a Session

The RUISDK.StopSession function stops an explicit session started with RUISDK.StartSession.

Explicit sessions are allowed only if RUISDK.CreateConfig was called with multiSessionEnabled = true. Any explicit sessions not ended with a call to RUISDK.StopSession are automatically ended when RUISDK.StopSDK is called. In case this method is never called, eventually this session will be considered as “timed-out”, and the time of the last recorded event will be assumed to be the time when the last event was recorded.

RUISDK.StopSession can be called between RUISDK.StartSDK and RUISDK.StopSDK, and can be called zero or more times.

RUISDK.StopSession is a synchronous function, returning when all functionality is completed.

RUISDK.StopSession

RUIResult RUISDK.StopSession (String sessionID)

Parameters

The RUISDK.StopSession function has the following parameters.

RUISDK.StopSession Parameters

Parameter

Description

sessionID (String)

This parameter should contain a unique ID that refers to the user session that is being stopped. This must be the same ID that was used earlier when calling RUISDK.StartSession.

Returns

The RUISDK.StopSession function returns a GenericReturn enum value with the following possible values.

RUISDK.StopSession Returns

Return

Description

ok

Function successful.

sdkInternalErrorFatal

Irrecoverable internal fatal error. No further API calls should be made.

sdkAborted

A required New Registration has failed, and hence the SDK is aborted. RUISDK.StopSDK and RUISDK destructor are possible.

suspended

Instance has been instructed by Server to back-off. Will return to Running once back-off cleared.

permanentlyDisabled

Instance has been instructed by Server to disable. This is permanent, irrecoverable state.

sdkOptedOut

Instance has been instructed by the application to opt-out.

configNotCreated

Configuration has not been successfully created.

sdkNotStarted

SDK has not been successfully started.

functionNotAvail

Function is not available.

sdkAlreadyStopped

SDK has already been successfully stopped.

invalidSessionIDExpectedNonEmpty

The sessionID is expected to be non-empty, and it was not.

invalidSessionIDTooShort

The sessionID violates its allowable minimum length.

invalidSessionIDTooLong

The sessionID violates its allowable maximum length.

invalidSessionIDAlreadyActive

The sessionID is already currently in use.