Automated Message Retrieval

The Usage Intelligence V5 SDK provides a default, automated ReachOut handler that works on Windows and macOS. Developers can override this handler by implementing the ReachOut handler interface with their own code and providing this handler to the RUISDK.SetReachOutHandler function after the creation of the RUISDK object. In brief, the RUIReachOutHandler class has three abstract methods that must be implemented:

Functions Required to Support Custom ReachOut

Function

Description

abstract public void Handle(String width, String height, Int32 position, String message)

Responsible for handling (displaying) the ReachOut message. The parameters are:

width—Width of the window as configured in the ReachOut campaign. Value will be suffixed by P for pixels or % for percentage.
height—Height of the window as configured in the ReachOut campaign. Value will be suffixed by P for pixels or % for percentage.
position—Position where the window should be displayed (1 = top-left, 2 = top-center, 3 = top-right, 4 = middle-left, 5 = middle-center, 6 = middle right, 7 = bottom-left, 8 = bottom-center, 9 = bottom-right).
message—URL to display.

abstract public int GetReadyForNext()

Called by the SDK to see if the handler is ready for the next ReachOut message. A zero value indicates not ready, non-zero indicates ready.

abstract public void Close()

Called by SDK when stopping or shutting down the SDK.

The RUISDK.SetReachOutHandler function sets a custom ReachOut handler. Any previously registered handler, including the default graphical ReachOut handler that may have been registered (RUISDK). Setting a handler to NULL effectively removes the current handler, if any, without setting a new handler.

RUISDK.SetReachOutHandler can be called more than once.

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

RUISDK.SetReachOutHandler

RUIResult RUISDK.SetReachOutHandler (RUIReachOutHandler handler)

Parameters

The RUISDK.SetReachOutHandler function has the following parameters.

RUISDK.SetReachOutHandler Parameters

Parameter

Description

handler (RUIReachOutHandler

An instance implementing the RUIReachOutHandler interface.

Returns

The RUISDK.SetReachOutHandler function returns a RUIResult enum value with the following possible values.

RUISDK.SetReachOutHandler Returns

Return

Description

ok

Function successful.

sdkInternalErrorFatal

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

sdkSuspended

The Server has instructed a temporary back-off.

sdkPermanentlyDisabled

The Server has instructed a permanent disable.

sdkOptedOut

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

sdkAlreadyStarted

SDK has already been successfully started.

sdkAlreadyStopped

SDK has already been successfully stopped.