类概述:
Provides access to ISO-DEP (ISO 14443-4) properties and I/O operations on a Tag.
Acquire an IsoDep object using get(Tag).
The primary ISO-DEP I/O operation is transceive(byte[]). Applications must implement their own protocol stack on top of transceive(byte[]).
Tags that enumerate the IsoDep technology in getTechList() will also enumerate NfcA or NfcB (since IsoDep builds on top of either of these).
Note: Methods that perform I/O operations require the NFC permission.
该类提供了访问ISO-DEP(ISO 14443 - 4)标记属性和I / O操作。
使用 get(Tag) 函数可以获得一个IsoDep对象。
应用程序必须他们自己的实现协议栈之上使用 transceive(byte[]) 函数。
使用 getTechList() 函数会列举IsoDep还将列举NfcA或NfcB(因为IsoDep构建在这两种技术其中一种之上的)。
注意:执行I / O操作的方法需要获取NFC权限。
核心函数:public byte[] transceive (byte[] data)
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.
向标签 tag发送原始ISO-DEP数据和接收响应。
调用将被取消并抛出IOException异常。