IT. Expert System.

Android Reference

NfcA


android.nfc.tech

Class NfcA

    • Method Detail

      • get

        public static NfcA get(Tag tag)
        Get an instance of NfcA for the given tag.

        Returns null if NfcA was not enumerated in Tag.getTechList(). This indicates the tag does not support NFC-A.

        Does not cause any RF activity and does not block.

        Parameters:
        tag - an NFC-A compatible tag
        Returns:
        NFC-A object
      • getAtqa

        public byte[] getAtqa()
        Return the ATQA/SENS_RES bytes from tag discovery.

        Does not cause any RF activity and does not block.

        Returns:
        ATQA/SENS_RES bytes
      • getSak

        public short getSak()
        Return the SAK/SEL_RES bytes from tag discovery.

        Does not cause any RF activity and does not block.

        Returns:
        SAK bytes
      • transceive

        public byte[] transceive(byte[] data)
                          throws IOException
        Send raw NFC-A commands to the tag and receive the response.

        Applications must not append the EoD (CRC) to the payload, it will be automatically calculated.

        Applications must only send commands that are complete bytes, for example a SENS_REQ is not possible (these are used to manage tag polling and initialization).

        Use getMaxTransceiveLength() to retrieve the maximum number of bytes that can be sent with transceive(byte[]).

        This is an I/O operation and will block until complete. It must not be called from the main application thread. A blocked call will be canceled with IOException if close() is called from another thread.

        Requires the android.Manifest.permission#NFC permission.

        Parameters:
        data - bytes to send
        Returns:
        bytes received in response
        Throws:
        TagLostException - if the tag leaves the field
        IOException - if there is an I/O failure, or this operation is canceled
      • getMaxTransceiveLength

        public int getMaxTransceiveLength()
        Return the maximum number of bytes that can be sent with transceive(byte[]).
        Returns:
        the maximum number of bytes that can be sent with transceive(byte[]).
      • setTimeout

        public void setTimeout(int timeout)
        Set the transceive(byte[]) timeout in milliseconds.

        The timeout only applies to transceive(byte[]) on this object, and is reset to a default value when close() is called.

        Setting a longer timeout may be useful when performing transactions that require a long processing time on the tag such as key generation.

        Requires the android.Manifest.permission#NFC permission.

        Parameters:
        timeout - timeout value in milliseconds
      • getTimeout

        public int getTimeout()
        Get the current transceive(byte[]) timeout in milliseconds.

        Requires the android.Manifest.permission#NFC permission.

        Returns:
        timeout value in milliseconds
      • isConnected

        public boolean isConnected()
        Description copied from interface: TagTechnology
        Helper to indicate if I/O operations should be possible.

        Returns true if TagTechnology.connect() has completed, and TagTechnology.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.

        Specified by:
        isConnected in interface TagTechnology
        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: 1101 / . Delta: 0.02221 с