Developer Zone

SDK Status Checks

RUIState RUISDK.GetState ()

Returns the current state of the RUI SDK instance. The RUI SDK state can change asynchronously.

RUISDK.GetState can be called more than once.

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

Return Type:

RUIState enum values below:

* fatalError                         Irrecoverable internal fatal error.  No further API calls should be made.
* uninitialized                      Instance successfully created but not yet successfully configured (CreateConfig).
* configInitializedNotStarted        Successfully configured (CreateConfig) and not yet started (StartSDK).  Will be normal start.
* configMissingOrCorruptNotStarted   Successfully configured (CreateConfig) and not yet started (StartSDK).  Will be a New Registration start.
* startedNewRegRunning               Running (StartSDK) with New Registration in progress, not yet completed.
* running                            Running (StartSDK) with no need for New Registration or with successfully completed New Registration.
* abortedNewRegProxyAuthFailure      Aborted run (StartSDK) due to failed proxy authentication on New Registration (CreateConfig).
* abortedNewRegNetworkFailure        Aborted run (StartSDK) due to failed New Registration (CreateConfig).
* abortedNewRegFailed                Aborted run (StartSDK) due to failed New Registration (CreateConfig).
* suspended                          Instance has been instructed by RUI Server to back-off.  Will return to Running once back-off cleared.
* permanentlyDisabled                Instance has been instructed by RUI Server to disable.  This is permanent, irrecoverable state.
* optedOut                           Instance has been instructed by the application to opt-out.
* stoppingNonSync                    Stop in progress (StopSDK).  Stopping non-Sync-related threads.
* stoppingAll                        Stop in progress (StopSDK).  Stopping Sync-related threads.
* stopped                            Stop completed (StopSDK).

RUIResult RUISDK.TestConnection ()

Tests the connection between the RUI SDK and the RUI Server. If a valid configuration file exists (RUISDK.CreateConfig), the URL used for the test will be the one in that file, set by the RUI Server. Otherwise, the URL used for the test will be one set by the client in the call to RUISDK.CreateConfig. If set, the proxy is used during the test (RUISDK.SetProxy).

This method allows you to test your application’s connectivity with the Revulytics Usage Intelligence server and to confirm that your CallHome URL is active and operational (for debugging purposes when using a custom CallHome URL). You do NOT need to call this method before other API calls since this would cause unnecessary traffic on your clients’ machines. Instead, you should check the return types by each API call since every API call that requires server communication does its own connection status check and returns any connection errors as part of its return type.

RUISDK.TestConnection can be called between RUISDK.CreateConfig and RUISDK.StopSDK, and can be called zero or more times.

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

Return Type:

RUIResult enum values below:

* 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.  StopSDK and RUISDK destructor are possible.
* permanentlyDisabled                    Instance has been instructed by RUI 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.
* sdkAlreadyStopped                      SDK has already been successfully stopped.
* networkConnectionError                 Not able to reach the RUI Server.
* networkServerError                     Error while communicating with the RUI Server.
* networkResponseInvalid                 Message format error while communicating with the RUI Server.
* testConnectionInvalidProductID         Invalid ProductID.
* testConnectionMismatch                 Mismatch between URL and ProductID.