Revision as of 00:31, 19 August 2011 by rebloor (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Developing NFC Applications

From Nokia Developer Wiki
Jump to: navigation, search

This article explains how to create NFC applications for the latest NFC equiped Symbian phones using Qt or Java technology.



You can create applications that leverage NFC technology using APIs provided in Qt, Java™ ME, and Symbian C++. Of these options, using Qt is the recommended approach as it’s the core development framework for Symbian and is available for MeeGo powered devices as well.

Qt based development

You create NFC enabled applications using the Qt Mobility 1.2 Connectivity API. The advantage of this approach is that you are working with the productive Qt cross-platform API, so you can code once for an app that will run on Symbian and MeeGo devices.

To get started you need an NFC enabled device and the Qt SDK 1.1 plus:

You can find example apps and code in the Qt Mobility 1.2 beta for Symbian add on package. The package enables development with the Symbian C++ NFC API also.

Further example apps are the NFC Corkboard (demonstrates NDEF reading and writing) and NFC Chat (LLCP peer-to-peer communication). In addition, you can download a step-by-step walkthrough tutorial that explains how to code these apps plus the basic Qt concepts required for understanding the interaction.

Java ME based development

You can make use of the NFC features in Symbian devices using the Contactless Communication API (JSR-257) and Nokia Extensions to JSR-257. This may be the most convenient approach if you have developed NFC applications for Series 40 devices (such as the Nokia 6131 NFC and Nokia 6212 classic). To get started you will need an NFC enabled device plus:

You can use the NFC device SDKs for the Series 40 devices also, if you wish. In particular, these SDKs currently offer better features for testing.

Symbian C++ based development

If you’re familiar with Symbian C++ you can use the Symbian C++ APIs in a pure Symbian C++ app. To do this, you need an NFC enabled device plus:

UI design considerations

As NFC is supported in a small (but set to grow) number of devices, it’s important to take this into account when creating your application. There are two approaches you can take:

  • If your application offers functionality that relies entirely on NFC, you can restrict it to install on devices known to offer NFC hardware only.
  • Where your application offers functionality that is useful without the use of NFC technology, then the UI should hide or disable the NFC features when running on a device without NFC hardware.

However, in both cases when running on the Nokia C7-00 your application should test to see if NFC functionality is available. If it’s not available the application should request the user to perform a firmware update (either using the SW Update application on their device or by running software update in Ovi Suite).

To determine if a device offers NFC:

  • In a Qt or Symbian C++ application use the IsFeatureSupported method of the TFeatureSet class and test for KFeatureIdNfc (ID = 117).
  • In a Java application query the javax.microedition.contactless.version system property value for the supported JSR-257 version. If the API is supported on the device, the property returns 1.0.


If you choose to develop with the NFC device SDKs for the Series 40 devices or make use of the Symbian^3 SDK with the NFC plug-in, these tools provide some emulation of NFC tags and devices suitable for application testing.

Features to emulate NFC tags and devices are planned for Qt SDK.

An NFC device is recommended also to complete testing prior to distributing your application.

Obtaining an NFC enabled device

If you’re a Nokia Developer Launchpad or PRO member you can obtain an NFC enabled device through the Prototype Device Loaning Service or the Discounted Devices Program.

As part of the Discounted Devices Program Nokia is making available an NFC Device Kit to Nokia Developer Launchpad and PRO members. The Kit includes an NFC mobile device and sample NFC tags. You can purchase it from here: Discounted Devices Program.

If you’re not a member of Launchpad or PRO, you can find details on how to join Launchpad here.

Article Metadata
Code ExampleTested withCompatibilityArticle
Created: (16 Feb 2013)
Last edited: rebloor (19 Aug 2011)
385 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.