Example: Creating a UID reader

This example shows you how to create a simple Near Field Communication (NFC) MIDlet that reads data from contactless targets and displays the data on the screen. The data read is the unique identifier (UID) of the target, and it is read only from an NDEF target. UIDs are factory-programmed and can be used to distinguish between targets.

Note: The MIDlet does not read the actual NDEF message (payload) from the target.

Figure: UIDReader MIDlet

Prerequisites

You need the following to develop and test this MIDlet:

For instructions on how to set up the Java ME development environment, see section Setting up the development environment.

Development

For more information about the MIDlet, see:

  • Design for information about the design and functionality of the MIDlet

  • Implementation for instructions on how to implement the MIDlet

You can download the project files for the MIDlet from the download page.