mitoyarzun / external-nfc-api

API for interaction with the External NFC Service app found in google play

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

External NFC Service API (native style) for Android

This API is for interacting with the External NFC Service app found in Google Play.

Background

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.

Overview

This repository contains source code for

There is also a Host Card Emulation client app for use with the Basic client app.

API

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.

Supported readers

Currently the ACS readers

are supported and must be connected to your Android device via an On-The-Go (OTG) USB cable.

Supported tag technology

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.

Troubleshooting

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 skjolber@gmail.com.

Related apps

You might be interested in

for configuration of your reader. Approximately the same configuration options are available using this API.

Feature requests

Please email feature requests to skjolber@gmail.com.

Distribution

Get in touch for bulk and/or offline distribution. A library jar is also available, simplifying distribution of your own app(s).

Need help?

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.

About

API for interaction with the External NFC Service app found in google play

License:Apache License 2.0


Languages

Language:Java 98.9%Language:HTML 1.1%