nfc_get_ndef_message()

Gets an NDEF message after an NDEF read.

Synopsis:

#include <nfc/nfc.h>
 
NFC_API nfc_result_t nfc_get_ndef_message(const nfc_target_t *target, unsigned int index, nfc_ndef_message_t **msg)

Since:

BlackBerry 10.0.0

Arguments:

target

The NFC target returned from the nfc_get_target() function.

index

The index of the message required from the message array. A valid index ranges from 0 to [nfc_get_ndef_message_count() - 1].

msg

The returned NDEF message. The message is owned by the NFC system and hence should not be cleaned up by the application.

Library:

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

Description:

The nfc_get_ndef_message() function gets a message from the array of one or more messages found after an NDEF read is successful.

Returns:

NFC_RESULT_SUCCESS, or NFC_RESULT_INVALID_PARAMETER, which indicates that an invalid argument was passed to the function.

Last modified: 2014-05-14



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

comments powered by Disqus