Android NFC development

NFC is supported by Android Phones since the introduction of the developer device Google Nexus S. This means, NFC is supported since Android version 2.3 or more specific since API level 9. Therefore, NFC is a core part of the Android API for quite a long time now. So, the documentation for Android developers is very mature at the current time and contains several examples. However, there are some more possibilities to develop NFC applications for Android which are described below.

NFC development with the Android SDK

The documentation of the Android SDK has grown over several generations. While the documentation included only a collection of class documentations in the beginning, it contains very detailed examples now. So, it is possible to learn from these examples by testing them out. Together with the Android IDE or alternatively Eclipse with Android SDK plugin you will be able to start with Android NFC development quickly.

Related to NFC the Android documentation contains an introductory section about NFC development which explains NFC basics but also advanced topics. In particular, you can learn more about the API functions in the method documentation. Furthermore, you can try out an application of these NFC methods by following one of the NFC application examples. Basically, only the following steps are required to be able to read NFC tags:

  1. The application must have the required permissions for access to NFC functionalities
  2. If a NFC tag is recognized a method must handle the event and process the input

In case you want to develop an application which only reacts to specific NFC tags it is recommended to define your own mime type. If this mime type is set as filter in the configuration the application only reacts to NFC tags which were encoded according to this mime type. Summarized, the NFC developer documentation offers an easy entry for all standard applications related to NFC.

Android NFC development with external NFC readers

Unfortunately, not all Android smartphones have an integrated NFC readers. Especially tablets very often do not have an integrated reader. However, you can use an external USB NFC reader to expand the tablets functionalities. Instead of the Android API this variant of Android NFC development requires using the PC/SC standard. Colleagues from SpringCard demonstrate in a blog entry the usage of a PS/SC interface with an external reader. Further examples can be found on Github.

Summarized, Android devices can be expanded with NFC functions easily by using an external reader. This possibility offers a more flexible choice of devices but the native Android APIs cannot be used anymore. Therefore, application has to deal with the integration of the reader. Basically, all NFC readers are suitable which are following the PC/SC standard.   

Erstellt: 2017-02-16 / Aktualisiert: 2017-09-13 2017-02-16 2017-09-13