IT. Expert System.

Android Reference

TagTechnology


android.nfc.tech

Interface TagTechnology

  • All Superinterfaces:
    AutoCloseable, Closeable
    All Known Implementing Classes:
    IsoDep, MifareClassic, MifareUltralight, Ndef, NdefFormatable, NfcA, NfcB, NfcBarcode, NfcF, NfcV


    public interface TagTechnology
    extends Closeable
    TagTechnology is an interface to a technology in a Tag.

    Obtain a TagTechnology implementation by calling the static method get() on the implementation class.

    NFC tags are based on a number of independently developed technologies and offer a wide range of capabilities. The TagTechnology implementations provide access to these different technologies and capabilities. Some sub-classes map to technology specification (for example NfcA, IsoDep, others map to pseudo-technologies or capabilities (for example Ndef, NdefFormatable).

    It is mandatory for all Android NFC devices to provide the following TagTechnology implementations.

    • NfcA (also known as ISO 14443-3A)
    • NfcB (also known as ISO 14443-3B)
    • NfcF (also known as JIS 6319-4)
    • NfcV (also known as ISO 15693)
    • IsoDep
    • Ndef on NFC Forum Type 1, Type 2, Type 3 or Type 4 compliant tags
    It is optional for Android NFC devices to provide the following TagTechnology implementations. If it is not provided, the Android device will never enumerate that class via Tag.getTechList().
    • MifareClassic
    • MifareUltralight
    • NdefFormatable must only be enumerated on tags for which this Android device is capable of formatting. Proprietary knowledge is often required to format a tag to make it NDEF compatible.

    TagTechnology implementations provide methods that fall into two classes: cached getters and I/O operations.

    Cached getters

    These methods (usually prefixed by get or is) return properties of the tag, as determined at discovery time. These methods will never block or cause RF activity, and do not require connect() to have been called. They also never update, for example if a property is changed by an I/O operation with a tag then the cached getter will still return the result from tag discovery time.

    I/O operations

    I/O operations may require RF activity, and may block. They have the following semantics.
    • connect() must be called before using any other I/O operation.
    • close() must be called after completing I/O operations with a TagTechnology, and it will cancel all other blocked I/O operations on other threads (including connect() with IOException.
    • Only one TagTechnology can be connected at a time. Other calls to connect() will return IOException.
    • I/O operations may block, and should never be called on the main application thread.

    Note: Methods that perform I/O operations require the android.Manifest.permission#NFC permission.

    • Field Detail

      • NFC_A

        static final int NFC_A
        This technology is an instance of NfcA.

        Support for this technology type is mandatory.

        See Also:
        Constant Field Values
      • NFC_B

        static final int NFC_B
        This technology is an instance of NfcB.

        Support for this technology type is mandatory.

        See Also:
        Constant Field Values
      • ISO_DEP

        static final int ISO_DEP
        This technology is an instance of IsoDep.

        Support for this technology type is mandatory.

        See Also:
        Constant Field Values
      • NFC_F

        static final int NFC_F
        This technology is an instance of NfcF.

        Support for this technology type is mandatory.

        See Also:
        Constant Field Values
      • NFC_V

        static final int NFC_V
        This technology is an instance of NfcV.

        Support for this technology type is mandatory.

        See Also:
        Constant Field Values
      • NDEF

        static final int NDEF
        This technology is an instance of Ndef.

        Support for this technology type is mandatory.

        See Also:
        Constant Field Values
      • NDEF_FORMATABLE

        static final int NDEF_FORMATABLE
        This technology is an instance of NdefFormatable.

        Support for this technology type is mandatory.

        See Also:
        Constant Field Values
      • MIFARE_CLASSIC

        static final int MIFARE_CLASSIC
        This technology is an instance of MifareClassic.

        Support for this technology type is optional. If a stack doesn't support this technology type tags using it must still be discovered and present the lower level radio interface technologies in use.

        See Also:
        Constant Field Values
      • MIFARE_ULTRALIGHT

        static final int MIFARE_ULTRALIGHT
        This technology is an instance of MifareUltralight.

        Support for this technology type is optional. If a stack doesn't support this technology type tags using it must still be discovered and present the lower level radio interface technologies in use.

        See Also:
        Constant Field Values
      • NFC_BARCODE

        static final int NFC_BARCODE
        This technology is an instance of NfcBarcode.

        Support for this technology type is optional. If a stack doesn't support this technology type tags using it must still be discovered and present the lower level radio interface technologies in use.

        See Also:
        Constant Field Values
    • Method Detail

      • connect

        void connect()
                     throws 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 android.Manifest.permission#NFC permission.

        Throws:
        TagLostException - if the tag leaves the field
        IOException - if there is an I/O failure, or connect is canceled
        See Also:
        close()
      • reconnect

        void reconnect()
                       throws IOException
        Re-connect to the Tag associated with this connection. Reconnecting to a tag can be used to reset the state of the tag itself.

        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.

        Requires the android.Manifest.permission#NFC permission.

        Throws:
        TagLostException - if the tag leaves the field
        IOException - if there is an I/O failure, or connect is canceled
        See Also:
        connect(), close()
      • isConnected

        boolean isConnected()
        Helper to indicate if I/O operations should be possible.

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

        Does not cause RF activity, and does not block.

        Returns:
        true if I/O operations should be possible


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1235 / . Delta: 0.04411 с