nfc_create_ndef_record()

Create an NDEF record.

Synopsis:

#include <nfc/nfc_ndef.h>
 
NFC_API nfc_result_t nfc_create_ndef_record(tnf_type_t tnf, const char *recordtype, const uchar_t *payload, size_t payload_length, const char *id, nfc_ndef_record_t **rec)

Since:

BlackBerry 10.0.0

Arguments:

tnf

NDEF Type Name Format.

recordtype

The record or mime type associated with the TNF.

payload

The NDEF record's payload.

payload_length

The byte length of the payload.

id

Must be NULL or an empty string for record with tnf NDEF_TNF_UNCHANGED, otherwise optional.

rec

The returned NDEF record. Application must delete this record using nfc_delete_ndef_record() when no longer in use.

Library:

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

Description:

This function creates an NDEF record. The parameters passed into this function must be valid according to the NFC Forum "NFC Data Exchange Format (NDEF) Technical Specification".

Returns:

NFC_RESULT_SUCCESS, or one of the following: