IT. Expert System.

Android Reference

NfcF


android.nfc.tech

Class NfcF

    • Method Detail

      • get

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

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

        Does not cause any RF activity and does not block.

        Parameters:
        tag - an NFC-F compatible tag
        Returns:
        NFC-F object
      • getSystemCode

        public byte[] getSystemCode()
        Return the System Code bytes from tag discovery.

        Does not cause any RF activity and does not block.

        Returns:
        System Code bytes
      • getManufacturer

        public byte[] getManufacturer()
        Return the Manufacturer bytes from tag discovery.

        Does not cause any RF activity and does not block.

        Returns:
        Manufacturer bytes
      • transceive

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

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

        Use getMaxTransceiveLength() to retrieve the maximum amount 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: 2539 / . Delta: 0.02179 с