IT. Expert System.

Android Reference

IsoDep


android.nfc.tech

Class IsoDep

    • Method Detail

      • get

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

        Does not cause any RF activity and does not block.

        Returns null if IsoDep was not enumerated in Tag.getTechList(). This indicates the tag does not support ISO-DEP.

        Parameters:
        tag - an ISO-DEP compatible tag
        Returns:
        ISO-DEP object
      • setTimeout

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

        The timeout only applies to ISO-DEP transceive(byte[]), 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 timeout for transceive(byte[]) in milliseconds.

        Requires the android.Manifest.permission#NFC permission.

        Returns:
        timeout value in milliseconds
      • getHistoricalBytes

        public byte[] getHistoricalBytes()
        Return the ISO-DEP historical bytes for NfcA tags.

        Does not cause any RF activity and does not block.

        The historical bytes can be used to help identify a tag. They are present only on IsoDep tags that are based on NfcA RF technology. If this tag is not NfcA then null is returned.

        In ISO 14443-4 terminology, the historical bytes are a subset of the RATS response.

        Returns:
        ISO-DEP historical bytes, or null if this is not a NfcA tag
      • getHiLayerResponse

        public byte[] getHiLayerResponse()
        Return the higher layer response bytes for NfcB tags.

        Does not cause any RF activity and does not block.

        The higher layer response bytes can be used to help identify a tag. They are present only on IsoDep tags that are based on NfcB RF technology. If this tag is not NfcB then null is returned.

        In ISO 14443-4 terminology, the higher layer bytes are a subset of the ATTRIB response.

        Returns:
        ISO-DEP historical bytes, or null if this is not a NfcB tag
      • transceive

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

        Applications must only send the INF payload, and not the start of frame and end of frame indicators. Applications do not need to fragment the payload, it will be automatically fragmented and defragmented by transceive(byte[]) if it exceeds FSD/FSC limits.

        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 - command bytes to send, must not be null
        Returns:
        response bytes received, will not be null
        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[]).
      • isExtendedLengthApduSupported

        public boolean isExtendedLengthApduSupported()

        Standard APDUs have a 1-byte length field, allowing a maximum of 255 payload bytes, which results in a maximum APDU length of 261 bytes.

        Extended length APDUs have a 3-byte length field, allowing 65535 payload bytes.

        Some NFC adapters, like the one used in the Nexus S and the Galaxy Nexus do not support extended length APDUs. They are expected to be well-supported in the future though. Use this method to check for extended length APDU support.

        Returns:
        whether the NFC adapter on this device supports extended length APDUs.
      • 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: 287 / 158677949. Delta: 0.10556 с