# Modules.Nfc.NdefRecord

Represents an immutable NDEF record.

Availability
1.0.0
6.3.0

# Overview

Android: The NDEF record is the base type for more type-specific NDEF records. You will generally work with the type-specific NDEF records (e.g. NdefRecordText, NdefRecordUri, etc.) which have more applicable properties for each type of record.

Use one of the Modules.Nfc.createNdefRecordApplication, Modules.Nfc.createNdefRecordEmpty, Modules.Nfc.createNdefRecordExternal, Modules.Nfc.createNdefRecordMedia, Modules.Nfc.createNdefRecordSmartPoster, Modules.Nfc.createNdefRecordText, Modules.Nfc.createNdefRecordUnknown, or Modules.Nfc.createNdefRecordUri method variants to create an NDEF record.

iOS: The NFC-functionality is available on iOS 11 and later. It currently only allows to read specific NDEF-tags - writing tags is not supported by iOS so far.

See also: NdefRecord (opens new window)

# Properties

# apiName READONLY

Availability
3.2.0
6.3.0
apiName :String

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Titanium.UI.Button returns Ti.UI.Button.


# hashCode READONLY

Availability
1.0.0
hashCode :Number

The integer hash code for this object.


# id READONLY

Availability
1.0.0
6.3.0
id :String

The variable length ID.


# lifecycleContainer

Availability
3.6.0

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.


# payload

Availability
1.0.0
6.3.0
payload :Titanium.Blob

The variable length payload for the record.


# recordType READONLY

Availability
1.0.0
recordType :String

The record type.


# tnf READONLY

Availability
1.0.0
6.3.0
tnf :Number

The 3-bit TNF.


# type READONLY

Availability
1.0.0
6.3.0
type :String

The variable length Type field.

# Methods

# getHashCode

Availability
1.0.0
getHashCode() Number

Returns the integer hash code for this object.

Returns

Type
Number

# getId

Availability
1.0.0
6.3.0
getId() String

Returns the variable length ID.

Returns

Type
String

# getRecordType

Availability
1.0.0
getRecordType() String

Returns the record type.

This is the class name of the NDEF record (e.g. NdefRecordText)

Returns

Type
String

# getTnf

Availability
1.0.0
6.3.0
getTnf() Number

Returns the 3-bit TNF.

Returns

Type
Number

# getType

Availability
1.0.0
6.3.0
getType() String

Returns the variable length Type field.

Returns

Type
String