nfc_get_ndef_message_bytes()

Return the serialized data of NDEF message.

Synopsis:

#include <nfc/nfc_ndef.h>
 
NFC_API nfc_result_t nfc_get_ndef_message_bytes(const nfc_ndef_message_t *msg, uchar_t *data)

Since:

BlackBerry 10.0.0

Arguments:

msg

The NDEF message to retrieve the data from.

data

A pointer to a pre-allocated array to return the data bytes of the message. This array must be at least equal to the length returned by the nfc_get_ndef_message_byte_length() function; otherwise, a call to this function will generate undefined behavior.

Library:

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

Description:

This function returns the data bytes of all records contained inside an NDEF message.

Returns:

NFC_RESULT_SUCCESS, or NFC_RESULT_INVALID_PARAMETER to indicate an invalid argument.