# Class IsoDep

java.lang.Object
com.codename1.nfc.TagTechnology
com.codename1.nfc.IsoDep

public class IsoDep extends TagTechnology

ISO 14443-4 / ISO 7816-4 technology view: send APDU command-response pairs to a contactless smart card (EMV payment, ePassport, government ID, transit). Backed by `IsoDep` on Android and by `NFCISO7816Tag` on iOS.

A typical SELECT-then-READ exchange:

    IsoDep iso = tag.getIsoDep();
    if (iso == null) {
        // tag is not ISO-DEP capable
        return;
    }
    byte[] selectAid = new byte[] {
        0x00, (byte) 0xA4, 0x04, 0x00, 0x07,
        (byte) 0xA0, 0x00, 0x00, 0x00, 0x04, 0x10, 0x10
    };
    iso.transceive(selectAid).onResult((sw, err) -> {
        // last two bytes of sw are the ISO 7816 SW1/SW2 status word
    });

All response bytes (including the terminating SW1/SW2 status word) are returned verbatim. Use [#isSuccess(byte[])] to test for the canonical `90 00` success word without slicing.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IsoDep()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `getHistoricalBytes()`
  Historical bytes returned during ISO-DEP activation (Android `IsoDep.getHistoricalBytes()`).
  `int`
  `getMaxTransceiveLength()`
  Largest single transceive payload the underlying transport accepts.
  `final TagType`
  `getType()`
  The technology variant this view represents.
  `boolean`
  `isExtendedLengthSupported()`
  `true` when this view exchanges extended-length APDUs (Lc / Le up to 65535).
  `static boolean`
  `isSuccess(byte[] response)`
  Returns `true` when the last two bytes of `response` are the ISO 7816 success status word (`90 00`).
  `AsyncResource<byte[]>`
  `transceive(byte[] apdu)`
  Sends the given raw bytes to the tag and resolves with the response.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### IsoDep

    public IsoDep()

- ## Method Details

  - ### getHistoricalBytes

    public byte[] getHistoricalBytes()
    Historical bytes returned during ISO-DEP activation (Android `IsoDep.getHistoricalBytes()`). Empty when the platform does not surface them.

  - ### getMaxTransceiveLength

    public int getMaxTransceiveLength()
    Largest single transceive payload the underlying transport accepts. Some Android implementations top out at 253 bytes for short APDU frames; Core NFC fragments at 256. Use as an upper bound when chunking large `READ BINARY` exchanges.

  - ### isExtendedLengthSupported

    public boolean isExtendedLengthSupported()
    `true` when this view exchanges extended-length APDUs (Lc / Le up to 65535). Most Android devices report `true`; iOS Core NFC reports `false`.

  - ### getType

    public final TagType getType()
    Description copied from class: `TagTechnology`
    The technology variant this view represents.
    Specified by:
      `getType` in class `TagTechnology`

  - ### isSuccess

    public static boolean isSuccess(byte[] response)
    Returns `true` when the last two bytes of `response` are the ISO 7816 success status word (`90 00`). Useful as a quick check after [#transceive(byte[])].

  - ### transceive

    public AsyncResource<byte[]> transceive(byte[] apdu)
    Description copied from class: `TagTechnology`
    Sends the given raw bytes to the tag and resolves with the response. The base class reports `NfcError.UNSUPPORTED_TAG` -- ports override per technology.
    Overrides:
      `transceive` in class `TagTechnology`