The use of viewers has been deprecated - use applications or cards as invocation targets instead.
#include <bps/navigator_invoke.h>
BPS_API int navigator_invoke_viewer_relay(const char *window_id,
const char *message_name,
const char *data,
const char *id,
bool is_response) BPS_DEPRECATED
BlackBerry 10.0.0
The window ID associated with the viewer. The window_id member must not be NULL.
The name or title of the message you want to send. The message_name member must not be NULL.
The data you want to send the viewer relay message target. The data member can be NULL.
The ID of the message. This is used to correlate the request with the peer's response. If you don't set this member, the sender doesn't receive a response to the sent message. Use the navigator_event_get_id() function to retrieve the id from the NAVIGATOR_INVOKE_VIEWER_RELAY_RESULT response event.
The request/response type of the message. If this member is false, the message type is a request, otherwise it's a response. The request messages are received by peer through NAVIGATOR_INVOKE_VIEWER_RELAY events. The responses from the peer are received through NAVIGATOR_INVOKE_VIEWER_RELAY_RESULT events.
Deprecated:
The use of viewers has been deprecated - use applications or cards as invocation targets instead.
The navigator_invoke_viewer_relay() function enables two way communication between the parent application and the viewer in the form of request/response messages. Both the viewer and the parent application use this function to send the data to each other.
If you call this function, the target application or viewer receives the NAVIGATOR_INVOKE_VIEWER_RELAY request event, and can retrieve the sent data. The sender gets a NAVIGATOR_INVOKE_VIEWER_RELAY_RESULT response event as a response to the sent message.
BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.