Saturday, September 1, 2012

NFC – SDK support on various platforms



NFC (Near Field Communication) is a technology in which a lot of research and advancements have happened over a period of time in recent past. This technology shares the same excitement world had when touch enabled mobile devices came into existence. Do things with natural gestures; Touch and Tap. The beauty and advantage of this technology is getting more and more applied in day to day life use cases; majorly because more and more mobile devices and Operating System vendors are adding support for NFC and related technologies.
This blog article just glimpse through the support various OEMs and Operating System vendors are providing to make use of this technology and build cool apps.
At a high level, the APIs are designed (in all of the available platforms) to be able to handle below use cases





At the API level, the APIs mainly
-          Interact with NFC tags for
o   Target Detection
o   NDEF (NFC Data Exchange Format) message handling
o   Reading and writing NDEF messages
o   Sending tag specific commands
o   Register for app auto start on tag touch
-          Interact with NFC devices to
o   Establish peer-to-peer sockets 
Google Android
Android adds support for NFC by having APIs which does
-          Parsing of NFC tag and figuring out the MIME type or a URI that identifies the data payload in the tag.
-          Encapsulate the MIME type or URI and the payload to Intent.
-          Start an activity based on Intent.
-          Writing and reading NDEF records
API level 9 supports ONLY limited tag dispatch (tag dispatch system analyzes the discovered tags, categorizes data and launches) and gives limited access to the NDEF message. API level 10 includes comprehensive reader/writer support as well as foreground NDEF pushing. API level 14 provides an easier way to push NDEF messages to other devices with Android Beam and extra convenience methods to create NDEF records. API level also includes facility for AAR (Android Application Record) 
The main classes and interfaces in Android for NFC are: NfcManager, NdefMessage, NdefRecord, NfcAdapter, NfcEvent
Android also gives support for other type of tags. The classes are available in android.nfc.tech package.
Development is using the same Android SDK + Eclipse ADT.
Nokia Mobile
Nokia is one of the first OEM who added support for NFC. There are a number of devices currently in market mainly. Nokia offers NFC support in various forms
Java ME APIs (JSR 257) support
-          Tag Discovery and data exchange
-          NDEF messages
-          The apps can be developed using Eclipse/Netbeans IDE with (NFC plugin + Symbian^3 SDK) or Nokia 6212 Classic NFC SDK. (DiscoveryManager, TagConnection, TargetListener, NDEFMessage, NDEFRecord are the major APIs along with Nokia’s LLCPConnection, LLCPManager classes)   
Symbian Platform NFC APIs
-          Exposes NFC middleware at platform level mainly aimed at platform developers
-          Development through Symbian^3 SDK + Carbide++ IDE + NFC plugin
Qt Mobility NFC:
-          Qt SDK enables developer for developing, testing Qt cross platform apps that can run on Symbian, MeeGo, Windows, Linux, Mac, and Embedded.
-          Qt Mobility 1.2 SDK gives support for NFC development. (QNearFieldManager, QNearFieldTarget, QNdefMessage, QNdefRecord, QLlcpServer, QLlcpSocket)
BlackBerry Mobile
BlackBerry is very committed to NFC and BlackBerry 7.0 had basic tag reading functionalities and later BlackBerry 7.1 included peer to peer functionalities. Some of the phones shipped with NFC support are: BlackBerry bold 9900/9930, BlackBerry Curve 9350/9360/9370. BlackBerry 10 said to have more support for NFC.
BlackBerry APIs seems to have modeled similar to JSR 257 APIs (in BlackBerry own package). The developer support is available in JDE 7.0.0. The major classes being NFCManager, NDEFMessage, NDEFRecord, NFCFieldListener, NFCStatusListener VirtualNDEFTag.
Samsung Mobile
Samsung provides extensive support for NFC via the Android platform and its proprietary Bada platform. Bada 2.0 supports Read/Write mode as of now using Osp::Net::Nfc namespace. It has capability to interact with NFC tag, support different events like tag discovery, message discovery and etc. The major interfaces being NfcManager, NfcTag, NdefTagConnection, NdefMessage, NdefRecord, NdefRecordType, ITagConnectionListener, INfcTagDiscoveryEventListener, INfcManagerEventListener, INdefTagConnectionListener
Samsung Galaxy S3 supports NFC.
NFC ecosystem opens up a whole new amazing world of possibilities!  Come, let us develop! J
Image Courtesy: Nokia Mobile NFC
References:

No comments:

Post a Comment