nfc_get_rtd_text()

Return the string encoded in a text NDEF record.

Synopsis:

#include <nfc/nfc_ndef.h>
 
NFC_API nfc_result_t nfc_get_rtd_text(const nfc_ndef_record_t *rec, char **text, char **language, nfc_ndef_rtd_encoding_t *text_encoding)

Since:

BlackBerry 10.0.0

Arguments:

rec

The text NDEF record. Chunked NDEF records are not supported.

text

The returned allocated null-terminated text string in either UTF-8 or UTF-16, indicated by the text_encoding argument. This string must be de-allocated by calling the free() function.

language

A pointer to an allocated NULL-terminated two or five byte ISO/IANA locale code. This string must be deallocated by calling the free() function.

text_encoding

A pointer to the encoded text. The text is encoded in UTF-8 or UTF-16.

Library:

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

Description:

This function returns the text string encoded in a text NDEF record.

Returns:

NFC_RESULT_SUCCESS, or one of the following: