Opt-Out Mechanism
Starting from version 5.1.0, a new opt-out mechanism was introduced. Using this mechanism, if a user does not want to send tracking information to Revenera, the function ruiOptOut() must be called after calling ruiCreateConfig() and before ruiStartSDK().
The ruiOptOut() function Instructs the SDK to send a message to the server to indicate that this user is opting-out (if not already sent in previous sessions) and disables all further functionality and communication with the server.
When ruiOptOut() is called, the SDK sends a message to the server after startup (ruiStartSDK()). This message informs the server that this client has opted-out and the server will register the opt-out. This message is only sent to the server once. The opt-out flag on the server will be used for reporting opt-out statistics only. The SDK will send no further information to the server as long as the user is opted-out.
If ruiOptOut() is called before a new registration, the server will never have any data about that installation. If ruiOptOut() is called for an installation that was already being tracked, the server will still contain the data that had been collected in the past and no past data is deleted.
The application must keep calling ruiOptOut() before every startup as long as the user wants to stay opted-out. If this function is not called, then the SDK assumes that the user is opting-in again and will start tracking normally.
Note that when an installation is not opted-out, it communicates with the server immediately on calling ruiStartSDK(). At this point, the SDK attempts to sync data regarding past application and event usage that had not been synced yet, and also system and product information such as OS version, CPU, GPU, product version, product edition, etc.
RUIRESULT ruiOptOut(RUIINSTANCE* ruiInstance)
Parameters
The ruiOptOut() function has the following parameters.
Parameter |
Description |
ruiInstance (RUIINSTANCE*) |
Pointer to the RUI instance created via ruiCreateInstance(). |
Returns
The ruiOptOut() function returns one of the return status constants below.
Return |
Description |
RUI_OK |
Function successful. |
RUI_INVALID_SDK_OBJECT |
SDK Instance parameter is NULL or invalid. |
RUI_SDK_INTERNAL_ERROR_FATAL |
Irrecoverable internal fatal error. No further API calls should be made. |
RUI_SDK_ABORTED |
A required New Registration has failed, and hence the SDK is aborted. ruiStopSDK() and ruiDestroyInstance() are possible. |
RUI_SDK_PERMANENTLY_DISABLED |
The Server has instructed a permanent disable. |
RUI_CONFIG_NOT_CREATED |
Configuration has not been successfully created. |
RUI_SDK_ALREADY_STARTED |
SDK has already been successfully started. |
RUI_SDK_ALREADY_STOPPED |
SDK has already been successfully stopped. |