event.messages


Type Array

Event nfc

See also nfc nfc.*


Overview

Present only when event.type is 'ndef'. Contains NDEF message, which consists of NDEF records.

Each element of the array is a table with the following properties.

Properties

id

String. Record id value.

tnf

String. TNF value. Can be 'absolute uri', 'empty', 'external type', 'mime media', 'unchanged', 'unknown' or 'well known'.

type

String. NDEF type. Can be 'alternative carrier', 'handover carrier', 'handover request', 'handover select', 'smart poster', 'text' or 'uri'.

rawTnf

Number. Raw TNF integer value.

rawType

Number. Raw NDEF type byte string.

payload

String. Raw byte string of the NDEF payload.

mimeType

String. Optional mime type of the record, only present if can be extracted. Requires Android 4.1+.

uri

String. Optional URI inside the record, only present if can be extracted. Requires Android 4.1+.

data

Table. Optional parsed NDEF message. See below for details.

Smart Poster NDEF record data

titles

Array. Array of tables, optional list of text messages in different languages. Table structure is identical to the Text NDEF tag data.

action

String. Optional recommended action, can be 'unknown', 'do action', 'save for later' or 'open for editing'.

mimeType

String. Optional mime type of the entity that the uri points to.

uri

String. URI of the Smart Poster NDEF tag record.

Text NDEF record data

encoding

String. Either 'UTF-8' or 'UTF-16'.

language

String. Language code of the text.

text

String. text message.

URI NDEF record data

uri

String. URI of the record.