@Implements(android.nfc.tech.IsoDep.class) public class ShadowIsoDep extends ShadowBasicTagTechnology
Control the allowed packet size with setExtendedLengthApduSupported(boolean)
and setMaxTransceiveLength(int)
. Note that extended Apdu packets have a max transceive length of 0x10008
but most hardware implementations will have a lower limit. If extended length apdus are not
supported, the theoretical max transceive length is 0x105 but, again, may be lower in practice.
Dictate the Apdu response returned in transceive(byte[])
via setTransceiveResponse(byte[])
or
setNextTransceiveResponse(byte[])
. The former will be returned with every call to transceive
while the later will be returned only once. If neither is set, transceive will throw an
IOException.
Constructor | Description |
---|---|
ShadowIsoDep() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
__constructor__(Tag tag) |
|
protected int |
getMaxTransceiveLength() |
|
protected int |
getTimeout() |
|
protected boolean |
isExtendedLengthApduSupported() |
|
static IsoDep |
newInstance() |
|
void |
setExtendedLengthApduSupported(boolean supported) |
|
void |
setMaxTransceiveLength(int length) |
|
void |
setNextTransceiveResponse(byte[] response) |
|
protected void |
setTimeout(int timeoutMillis) |
|
void |
setTransceiveResponse(byte[] response) |
|
protected byte[] |
transceive(byte[] data) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, connect, isConnected
public static IsoDep newInstance()
@Implementation protected void __constructor__(Tag tag)
@Implementation protected byte[] transceive(byte[] data) throws IOException
IOException
public void setTransceiveResponse(byte[] response)
public void setNextTransceiveResponse(byte[] response)
@Implementation protected void setTimeout(int timeoutMillis)
@Implementation protected int getTimeout()
@Implementation protected int getMaxTransceiveLength()
public void setMaxTransceiveLength(int length)
@Implementation protected boolean isExtendedLengthApduSupported()
public void setExtendedLengthApduSupported(boolean supported)