This API is for interacting with the External NFC Service app found in Google Play.
The External NFC Service app offers NFC functionality similar to the built-in Android NFC API - for external NFC readers:
- External NFC reader management and interaction
- NFC Tag access using Andriod built-in (native) types (Ndef, MifareUltralight, IsoDep, etc).
This very much simplifies implementation in use-cases where external NFC readers is required, so it will save a lot of development time.
This repository contains source code for
- An Android library project (the actual API), and
- Demo client apps demonstrating actual usage
- Basic client app
- NXP API client for MIFARE SDK
- Web Kiosk client with javascript bindings
There is also a Host Card Emulation client app for use with the Basic client app.
The API defines
- broadcast actions
- service start / stop and status
- reader open / close and status
- tag connect / disconnect
- 'extras' objects for interaction with readers
- disable beeps
- display text
- configure NFC tech types (PICC)
- enable/disable LEDs
- run custom commands
- abstract activities for interaction with built-in and external NFC (in parallel)
- these currently depend on the NDEF Tools for Android project.
- Programmatically start and stop the service (see methods startService() and stopService() in the NfcExternalDetectorActivity class in for an example).
Note that tag interaction is performed via the native NFC classes and so these are not included in the API itself.
Currently the ACS readers
are supported and must be connected to your Android device via an On-The-Go (OTG) USB cable.
Mifare Ultralight and Mifare Classic (including NTAG203, NTAG213) tags are supported. I recommend Mifare Ultralights / NTAG203. Desfire EV1 tags are supported but without NDEF support. Host card emulation (IsoDep) targets are also supported.
Please note:
- ACR 122U the Mifare Classic does not work.
Note that not all Android devices actually have an USB hub.
Does the ACR reader not light up when connected to your device, even after the service asks for USB permissions? The ACR reader shuts down if there is not enough battery, so try charging your battery more.
Please report any issues to [email protected].
You might be interested in
- ACR 1222L USB NFC Reader Utils
- ACR 122 USB NFC Reader Utils
- ACR 1251 USB NFC Reader Utils
- ACR 1281 USB NFC Reader Utils
for configuration of your reader. Approximately the same configuration options are available using this API.
Please email feature requests to [email protected].
Get in touch for bulk and/or offline distribution. A library jar is also available, simplifying distribution of your own app(s).
If you need professional assistance with an NFC project, get in touch. I also do
- Host Card Emulation (HCE) for Android
- Desfire EV1 tech (with encryption)
- Smartcard-related workflows and integrations
- Tag emulation
Feel free to connect with me on LinkedIn.