# NFC

Support HCE (host-based card simulation) mode, which simulates Android phones into physical smart cards. Support NFC Read and write, that is, the phone is used as a card reader.

  • Suitable models: support NFC Functionality, and the system version is Android 5.0 And above cell phones
  • Applicable Card Scope: ISO Compliant 14443-4 Standard CPU card
  • Support Reader/Writer (Reader/Writer) mode, that is, support NFC Device read and/Or write passive NFC Labels and stickers.
  • Suitable models: support NFC Functionality, and the system version is Android 5.0 And above cell phones
  • Scope of Application:
    • Support for NFC-A (ISO 14443-3A)/NFC-B (ISO 14443-3B)/NFC-F (JIS 6319-4)/NFC-V (ISO 15693)/ISO-DEP (ISO 14443-4) Reading and writing standards
    • (some Android phones) support MIFARE Classic/MIFARE Read and write for the Ultralight tag
    • Supports reading and writing of NDEF data on NFC labels in NDF format

# Basic flow

Previous NFC-A card writing apdu instruction

  • Call wx.getNFCAdapter() get NFC adapter instance
  • Call NFCAdapter.onDiscovered(function Callback) Register sticklistencallback
  • Call NFCAdapter.startDiscovery(Object Object) starts listening for sticker cards
  • Posted card, onDiscoveredcallback
    • Matches to card support NFC-A standard based on onDiscovered callback res object's techs field
    • Via NFCAdapter.getNfcA() get NfcA instance
  • Read and write using NfcA instances
    • Call NfcA.connect() and NFC cards to establish a connection
    • Call NfcA.transceive(Object Object) writes apdu instructions to NFC cards and receives card return data
    • Read and write complete, call NfcA.close() disconnect
  • Call NFCAdapter.stopDiscovery(Object Object) end listening sticker card