notification_message_set_invocation_payload()

Specify a payload of arbitrary data to be sent to the target application.

Synopsis:

#include <bps/notification.h>
 
BPS_API int notification_message_set_invocation_payload(notification_message_t *message,
                                                        const void *payload,
                                                        int length)

Since:

BlackBerry 10.0.0

Arguments:

message

A pointer to the notification_message_t structure that you want to set the payload for.

payload

The data to be handed to the application via invocation framework on launch. The buffer is automatically encoded to base64 to match the invocation framework.

length

The size of the payload data in bytes.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

The notification_message_set_invocation_payload() function specifies a payload to be sent to the target application via the invocation framework. A payload is arbitrary data, which this function converts into base64 for consumption by the invocation framework.

The payload member is used only with the notification_notify() function, and only when you've set an invocation target via the notification_message_set_invocation_target() function.

If you don't call this function, a payload URI is sent instead, or if you haven't specified one (using the notification_message_set_invocation_payload_uri() function), no data is delivered on invocation.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus