Package com.codename1.nfc
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.
-
ClassDescriptionHelpers for working with the ISO 7816 status word (SW1/SW2) trailer at the end of every APDU response.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.ISO 14443-4 / ISO 7816-4 technology view: send APDU command-response pairs to a contactless smart card (EMV payment, ePassport, government ID, transit).NXP MIFARE Classic 1K/4K technology view.NXP MIFARE Ultralight / Ultralight C / NTAG21x technology view.An NDEF message -- the payload of an NDEF-formatted tag.A single NDEF (NFC Data Exchange Format) record.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.NFC-A (ISO 14443-3A) raw transceive view.NFC-B (ISO 14443-3B) raw transceive view.Typed error codes returned by
NfcandHostCardEmulationServicewhen an asynchronous NFC operation fails.Thrown via the failure path of anAsyncResourcereturned byNfcwhen an NFC read, write, or HCE operation fails.FeliCa (JIS X 6319-4) technology view -- the contactless protocol used by Suica, PASMO, ICOCA and other Japanese transit / payment cards.Callback for long-running tag-discovery sessions registered viaNfc.addTagListener(NfcListener).Configures a single call toNfc.readTag(NfcReadOptions)orNfc.addTagListener(NfcListener).ISO 15693 (vicinity-card) technology view.A tag discovered byNfc.readTag(NfcReadOptions)orNfc.addTagListener(NfcListener).Common surface for the low-level technology views attached to aTag--IsoDep,MifareClassic,MifareUltralight,NfcA,NfcB,NfcF,NfcV.Tag technologies that a discoveredTagmay support.