package com.codename1.nfc
Near Field Communication (NFC) API: read and write NDEF messages, exchange APDUs with contactless smart cards, and host-emulate as a card.
Nfc.getInstance() returns the platform implementation; supporting
classes cover NDEF (NdefMessage, NdefRecord), tag discovery
(Tag, TagType, TagTechnology, NfcListener,
NfcReadOptions), specific tag technologies (IsoDep,
MifareClassic, MifareUltralight, NfcA, NfcB, NfcF,
NfcV), APDU exchange (ApduResponse) and host card emulation
(HostCardEmulationService). Failures surface through NfcError
and NfcException.
Types
class ApduResponse | Helpers for working with the ISO 7816 status word (SW1/SW2) trailer at the end of every APDU response. |
class HostCardEmulationService | Application-supplied handler for Host Card Emulation (HCE) – the mode where the device acts as a contactless smart card and answers APDUs from a nearby reader/terminal. |
class IsoDep | ISO 14443-4 / ISO 7816-4 technology view: send APDU command-response pairs to a contactless smart card (EMV payment, ePassport, government ID, transit). |
class MifareClassic | NXP MIFARE Classic 1K/4K technology view. |
class MifareUltralight | NXP MIFARE Ultralight / Ultralight C / NTAG21x technology view. |
class NdefMessage | An NDEF message – the payload of an NDEF-formatted tag. |
class NdefRecord | A single NDEF (NFC Data Exchange Format) record. |
class Nfc | Entry point for the Codename One NFC API – read and write NDEF messages, exchange APDUs with smart cards, and host-emulate as a contactless card. |
class NfcA | NFC-A (ISO 14443-3A) raw transceive view. |
class NfcB | NFC-B (ISO 14443-3B) raw transceive view. |
enum NfcError | Typed error codes returned by Nfc and HostCardEmulationService when an asynchronous NFC operation fails. |
class NfcException | Thrown via the failure path of an AsyncResource returned by Nfc when an NFC read, write, or HCE operation fails. |
class NfcF | FeliCa (JIS X 6319-4) technology view – the contactless protocol used by Suica, PASMO, ICOCA and other Japanese transit / payment cards. |
interface NfcListener | Callback for long-running tag-discovery sessions registered via Nfc.addTagListener(NfcListener). |
class NfcReadOptions | Configures a single call to Nfc.readTag(NfcReadOptions) or Nfc.addTagListener(NfcListener). |
class NfcV | ISO 15693 (vicinity-card) technology view. |
class Tag | A tag discovered by Nfc.readTag(NfcReadOptions) or Nfc.addTagListener(NfcListener). |
class TagTechnology | Common surface for the low-level technology views attached to a Tag – IsoDep, MifareClassic, MifareUltralight, NfcA, NfcB, NfcF, NfcV. |
enum TagType | Tag technologies that a discovered Tag may support. |