2Developing NFC Applications with Android
NFC applications can be developed in the three NFC operating modes (see section 1.3.2):
- – in the reader/writer mode, the NFC smartphone acts as an active initiator terminal (generating RF fields as power supply) to read and encode a passive target NFC tag;
- – the P2P mode allows communication between two NFC-enabled devices: they can exchange data by being both initiator and target in turn (in active/active or active/passive mode) thanks to the LLCP layer (see section 188.8.131.52) and its management of collisions;
- – in the card emulation mode, the passive NFC-enabled target device behaves as a smart card; in this specific mode, the smartphone can host one or several terminal applications executed in the host OS environment, which can act as the user interface and/or as intermediate application (proxy) to interface with a remote system, and one or several services executed in the SEs secure environment (see section 184.108.40.206).
An NFC smartphone or tablet can act as a reader/encoder of NFC tags in the reader/writer mode. In the P2P mode, the smartphone can also exchange data with another NFC device. In the card emulation mode, the smartphone can act as a contactless NFC smart card (with a SE or an HCE service) to be “read” by an NFC reader.
This chapter introduces mobile applications programming on the Android platform in the three NFC modes, including the HCE mode.
NOTE.– In this chapter, we provide a brief introduction to Android application ...