Automated Message Retrieval
The RUI V5 SDK provides a default, automated ReachOut handler that works on Windows and macOS. Developers can override this handler by implementing the ReachOut handler functions with their own code and providing these handler functions to the the setReachOutHandler: function. See the ruiSDKOBJC.h file for details on the RUIReachOutHandlerOBJC class. In brief, the RUIReachOutHandlerOBJC class must implement the three following methods:
Function |
Description |
-(void)handleWidth:(NSString*)width height:(NSString*)height position:(int32_t)position message:(NSString*)message |
Handles displaying the ReachOut message. |
-(int32_t)getReadyForNext |
Called by the SDK to determine if the handler is ready for the next ReachOut message. Return zero if not ready, non-zero if ready. |
-(void)close |
Called by the SDK when the SDK is stopped or shutdown. |
The setReachOutHandler: function sets a custom ReachOut handler. Any previously registered handler, including the default graphical ReachOut handler that may have been registered (createConfig). Setting a handler to NULL effectively removes the current handler, if any, without setting a new handler.
setReachOutHandler: can be called more than once.
setReachOutHandler: is a synchronous function, returning when all functionality is completed.
(RUIRESULTOBJC) setReachOutHandler: (id<RUIReachOutHandlerOBJC>)handler
Parameters
The setReachOutHandler: function has the following parameters.
Parameter |
Description |
handler (id<RUIReachOutHandlerOBJC>) |
An instance implementing the RUIReachOutHandlerOBJC interface. |
Returns
The setReachOutHandler: function returns one of the return status constants below.
Parameter |
Description |
RUI_OK |
Function successful. |
RUI_SDK_INTERNAL_ERROR_FATAL |
Irrecoverable internal fatal error. No further API calls should be made. |
RUI_SDK_SUSPENDED |
The Server has instructed a temporary back-off. |
RUI_SDK_PERMANENTLY_DISABLED |
The Server has instructed a permanent disable. |
RUI_SDK_OPTED_OUT |
Instance has been instructed by the application to opt-out. |
RUI_SDK_ALREADY_STARTED |
The SDK has already been successfully started. |
RUI_SDK_ALREADY_STOPPED |
SDK has already been successfully stopped. |