# Modules.Nfc.TagTechnologyNdef

Provides access to NDEF content and operations on a Modules.Nfc.NfcTag.

Availability
1.1.0

# Overview

Use the Modules.Nfc.createTagTechnologyNdef method to create this tag technology.

See also: Ndef (opens new window)

# Properties

# apiName READONLY

Availability
3.2.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.


# 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.


# tag

Availability
1.1.0

The tag technology that has been discovered.

When a tag is discovered, a Modules.Nfc.NfcTag proxy is created and passed as a property to the onNdefDiscovered, onTagDiscovered, or onTechDiscovered callback (see NdefDiscovered).

# Methods

# canMakeReadOnly

Availability
1.1.0
canMakeReadOnly() Boolean

Indicates whether a tag can be made read-only with makeReadOnly.

Returns

true if it is possible to make this tag read-only.

Type
Boolean

# close

Availability
1.1.0
close() void

Disable I/O operations to the tag and release resources.

Returns

Type
void

# connect

Availability
1.1.0
connect() void

Enable I/O operations to the tag.

Only one Tag Technology proxy can be connected to a Tag at a time.

Returns

Type
void

# getCachedNdefMessage

Availability
1.1.0
getCachedNdefMessage() Modules.Nfc.NdefMessage

Get the Modules.Nfc.NdefMessage that was read from the tag at discovery time.

Returns

NDEF Message read from the tag at discovery time, can be null.


# getMaxSize

Availability
1.1.0
getMaxSize() Number

Get the maximum NDEF message size in bytes.

Returns

Type
Number

# getNdefMessage

Availability
1.1.0
getNdefMessage() Modules.Nfc.NdefMessage

Read the current Modules.Nfc.NdefMessage on this tag.

Returns

The NDEF Message, can be null.


# getType

Availability
1.1.0
getType() String

Get the NDEF tag type.

One of TAG_TYPE_NFC_FORUM_TYPE_1, TAG_TYPE_NFC_FORUM_TYPE_2, TAG_TYPE_NFC_FORUM_TYPE_3, TAG_TYPE_NFC_FORUM_TYPE_4, TAG_TYPE_MIFARE_CLASSIC, or another NDEF tag type that has not yet been formalized in the Android API.

Returns

Type
String

# isConnected

Availability
1.1.0
isConnected() Boolean

Returns true if connect has completed, and close has not been called, and the tag is not known to be out of range.

Returns

Type
Boolean

# isValid

Availability
1.1.0
isValid() Boolean

Return true if this tag technology was successfully obtained.

Returns

Type
Boolean

# isWritable

Availability
1.1.0
isWritable() Boolean

Determine if the tag is writable.

Returns

true if the tag is writable.

Type
Boolean

# makeReadOnly

Availability
1.1.0
makeReadOnly() Boolean

Make a tag read-only.

Returns

true on success, false if it is not possible to make this tag read-only.

Type
Boolean

# writeNdefMessage

Availability
1.1.0
writeNdefMessage(message) void

Overwrite the Modules.Nfc.NdefMessage on this tag.

Parameters

Name Type Description
message Modules.Nfc.NdefMessage

Returns

Type
void