![]() |
NFC / NDEF Library for Proximity APIs
4.1.0
Easily parse and create NDEF records with the Windows Proximity APIs / Near Field Communication NFC.
|
An NDEF message is composed of one or more NDEF records. More...
Public Member Functions | |
| byte [] | ToByteArray () |
| Convert all the NDEF records currently stored in the NDEF message to a byte array suitable for writing to a tag or sending to another device. More... | |
Static Public Member Functions | |
| static NdefMessage | FromByteArray (byte[] message) |
| Returns the NDEF message parsed from the contents of message . More... | |
An NDEF message is composed of one or more NDEF records.
This class is essentially just a list of records, and provides the necessary methods to convert all the records into a single byte array that can be written to a tag and has the correct flags set (e.g., message begin / end). NdefMessage can also parse a byte array into an NDEF message, separating and creating all the individual records out of the array.
From the NFC Forum specification document: NFC Forum Data Exchange Format is a lightweight binary message format designed to encapsulate one or more application-defined payloads into a single message construct.
An NDEF message contains one or more NDEF records, each carrying a payload of arbitrary type and up to (2^32)-1 octets in size. Records can be chained together to support larger payloads.
An NDEF record carries three parameters for describing its payload: the payload length, the payload type, and an optional payload identifier.
|
static |
Returns the NDEF message parsed from the contents of message .
The message parameter is interpreted as the raw message format defined in the NFC Forum specifications.
| message | Raw byte array containing the NDEF message, which consists of 0 or more NDEF records. |
| NdefException | Thrown if there is an error parsing the NDEF message out of the byte array. |
| byte [] NdefLibrary.Ndef.NdefMessage.ToByteArray | ( | ) |
Convert all the NDEF records currently stored in the NDEF message to a byte array suitable for writing to a tag or sending to another device.
1.8.13