Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -12899,6 +12899,7 @@ package android.nfc.tech { method public byte[] getHistoricalBytes(); method public int getMaxTransceiveLength(); method public int getTimeout(); method public boolean isExtendedLengthApduSupported(); method public void setTimeout(int); method public byte[] transceive(byte[]) throws java.io.IOException; } core/java/android/nfc/INfcTag.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -45,4 +45,5 @@ interface INfcTag void resetTimeouts(); boolean canMakeReadOnly(int ndefType); int getMaxTransceiveLength(int technology); boolean getExtendedLengthApdusSupported(); } core/java/android/nfc/tech/IsoDep.java +23 −0 Original line number Diff line number Diff line Loading @@ -179,4 +179,27 @@ public final class IsoDep extends BasicTagTechnology { public int getMaxTransceiveLength() { return getMaxTransceiveLengthInternal(); } /** * <p>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. * * <p>Extended length APDUs have a 3-byte length field, allowing 65535 * payload bytes. * * <p>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. * * @return whether the NFC adapter on this device supports extended length APDUs. */ public boolean isExtendedLengthApduSupported() { try { return mTag.getTagService().getExtendedLengthApdusSupported(); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return false; } } } Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -12899,6 +12899,7 @@ package android.nfc.tech { method public byte[] getHistoricalBytes(); method public int getMaxTransceiveLength(); method public int getTimeout(); method public boolean isExtendedLengthApduSupported(); method public void setTimeout(int); method public byte[] transceive(byte[]) throws java.io.IOException; }
core/java/android/nfc/INfcTag.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -45,4 +45,5 @@ interface INfcTag void resetTimeouts(); boolean canMakeReadOnly(int ndefType); int getMaxTransceiveLength(int technology); boolean getExtendedLengthApdusSupported(); }
core/java/android/nfc/tech/IsoDep.java +23 −0 Original line number Diff line number Diff line Loading @@ -179,4 +179,27 @@ public final class IsoDep extends BasicTagTechnology { public int getMaxTransceiveLength() { return getMaxTransceiveLengthInternal(); } /** * <p>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. * * <p>Extended length APDUs have a 3-byte length field, allowing 65535 * payload bytes. * * <p>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. * * @return whether the NFC adapter on this device supports extended length APDUs. */ public boolean isExtendedLengthApduSupported() { try { return mTag.getTagService().getExtendedLengthApdusSupported(); } catch (RemoteException e) { Log.e(TAG, "NFC service dead", e); return false; } } }