Skip to content
Go to file


Failed to load latest commit information.
Latest commit message
Commit time


== Examples for the NFC Tools for Java ==

This repository contains some examples for the NFCTools for Java:

== Download compiled JAR file ==

Your can download all examples together with the dependencies as a JAR file from this URL:

To launch the demos execute the following commands. To end a demo press CTRL-C at any time.

Host-based Card Emulation demo:

java -cp nfctools-examples.jar org.nfctools.examples.hce.HceDemo

SnepDemo demo:

java -cp nfctools-examples.jar org.nfctools.examples.snep.SnepDemo -url <url-to-send> -target -terminal <terminalname>

-target : activates target mode, please use it with Android 4.1
-terminal : pass a string as terminal name if you have several NFC devices connected

LlcpDemo demo:

java -cp nfctools-examples.jar org.nfctools.examples.llcp.LlcpDemo

LlcpService demo (old):

java -cp nfctools-examples.jar org.nfctools.examples.llcp.LlcpService

java -cp nfctools-examples.jar org.nfctools.examples.ndefreader.NdefReaderDemo


java -cp nfctools-examples.jar org.nfctools.examples.clearcard.ClearCardDemo


java -cp nfctools-examples.jar org.nfctools.examples.scancard.ScanWholeCardDemo

== Demo descriptions ==

ClearCardDemo will try to delete all data on a Mifare Classic card and put the card back into transport mode. It will
use some known keys to access the sectors.

NdefReaderDemo reads an NDEF message from a Mifare Classic card and shows it in the log.

NdefWriterDemo writes an NDEF message on a Mifare Classic card.

ScanWholeCardDemo scans the whole Mifare Classic card and shows the contents in the log.

LlcpService demonstrates a P2P connection with an Android phone. It will receive any Android Beam and NDEF Push
messages and show them in the log.
With Android 2.3 and 4.1 please set initiatorMode to false, with Android 4.0 it works best in initiatorMode set to true.


Examples for the nfctools library



No packages published
You can’t perform that action at this time.