NFC

NFC.setText()

NFC.setText, setText

Sets text to be passed to the NFC reader.

// PROTOTYPE
int setText(const char* text, const char* encoding)
  • text A c-string (null-terminated) containing the text to send
  • encoding The IANA language code. For example, "en" for English.

Note that all of the set options are mutually exclusive. Calling NFC.setText() will clear any NFC.setUri(), NFC.setLaunchApp(), etc..

The maximum size is 988 bytes for a single text record. Adding multiple records will add some additional overhead for each NDEF message, 2 - 4 bytes, plus the length of the data.