java.lang.Object | |
↳ | android.nfc.tech.NfcBarcode |
Provides access to tags containing just a barcode.
Acquire an NfcBarcode
object using get(Tag)
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | TYPE_KOVIO | Kovio Tags | |||||||||
int | TYPE_UNKNOWN |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Disable I/O operations to the tag from this
TagTechnology object, and release resources. | |||||||||||
Enable I/O operations to the tag from this
TagTechnology object. | |||||||||||
Get an instance of
NfcBarcode for the given tag. | |||||||||||
Returns the barcode of an NfcBarcode tag.
| |||||||||||
Get the
Tag object backing this TagTechnology object. | |||||||||||
Returns the NFC Barcode tag type.
| |||||||||||
Helper to indicate if I/O operations should be possible.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.nfc.tech.TagTechnology
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
From interface
java.lang.AutoCloseable
|
Disable I/O operations to the tag from this TagTechnology
object, and release resources.
Also causes all blocked I/O operations on other thread to be canceled and
return with IOException
.
Requires the NFC
permission.
IOException |
---|
Enable I/O operations to the tag from this TagTechnology
object.
May cause RF activity and may block. Must not be called
from the main application thread. A blocked call will be canceled with
IOException
by calling close()
from another thread.
Only one TagTechnology
object can be connected to a Tag
at a time.
Applications must call close()
when I/O operations are complete.
Requires the NFC
permission.
IOException |
---|
Get an instance of NfcBarcode
for the given tag.
Returns null if NfcBarcode
was not enumerated in getTechList()
.
Does not cause any RF activity and does not block.
tag | an NfcBarcode compatible tag |
---|
Returns the barcode of an NfcBarcode tag.
Tags of TYPE_KOVIO
return 16 bytes:
The first byte is 0x80 ORd with a manufacturer ID, corresponding to ISO/IEC 7816-6.
The second byte describes the payload data format. Defined data format types include the following:
The following 12 bytes are payload:
The last 2 bytes comprise the CRC.
Does not cause any RF activity and does not block.
Get the Tag
object backing this TagTechnology
object.
Tag
backing this TagTechnology
object.
Returns the NFC Barcode tag type.
Currently only one of TYPE_KOVIO
or TYPE_UNKNOWN
.
Does not cause any RF activity and does not block.