NDEF Library for Proximity APIs (NFC)

Easily parse and create NDEF records with the Windows Proximity APIs (NFC) for Windows 8 and Windows Phone 8.

Overview

NdefDemo Example App on the Lumia 820The Proximity APIs for NFC (Near Field Communication) in the Windows 8 platform are compatible to NDEF (NFC Data Exchange Format) messages, which are used on NFC tags and to send data between two devices.

While the Proximity APIs include basic support for URIs, they lack support for more in-depth control over the NDEF records, as well as additional standardized record types.

This NDEF Library provides a set of classes that enable you to easily work with NDEF records on top of the Windows Proximity APIs.

Integrate the library into your Windows 8 platform project using the NuGet package manager of Visual Studio. The portable class library is fully compatible to Windows 8 & Windows Phone 8.

Reusable NDEF classes

  • Parse NDEF message & records from raw byte arrays
  • Extract all information from the bits & bytes contained in the record
  • Create standard compliant records just by providing your data
  • Identify the exact record type when reading an NDEF message
  • Records check their contents for validity according to standards
  • Can throw NdefException in case of content validity issues, with translatable messages defined in a resource file
  • Fully documented source code, following Doxygen standards

Supported NDEF records

  • URI: the most common type: any kind of URI, for example an Internet address, email link or any custom URI scheme.
  • Smart Poster: combines a URL with textual descriptions in various languages (C# only)
  • Text records: contains text in a specific language
  • Microsoft LaunchApp: launch a Windows (Phone) app just by tapping a tag (C# only)
  • Android Application Record (AAR): launch an Android app
  • Bluetooth Secure Simple Pairing: connect to a Bluetooth device, contains information about the target device like the service class (C# only)
  • Handover Select: part of the Connection Handover specification, provides a list of alternative carriers to connect to. Used for example for NFC loudspeakers (C# only)
    Includes support for child records – Handover Alternative Carrier and Handover Error records

New and custom functionality (C#)

  • Smart URI class: automatically represents itself as the smallest possible NDEF type (URI or Smart Poster), depending on supplied data

Convenience classes extending the basic URI class for common use case scenarios

  • Geo: longitude & latitude of a place, using different Geo URI schemes (more details)
  • Social: linking to social networks like Twitter, Facebook, Foursquare or Skype
  • SMS: defining number and body of the message (C# only)
  • Mailto: sending email messages with recipient address and optional subject and body (C# only)
  • Telephone call: defining the number to call
  • Nokia Accessories: let the user choose an app to launch on his Nokia Lumia Windows Phone 8 device (C# only)
  • WpSettings: launch a settings page on Windows Phone 8 (e.g., Bluetooth settings, flight mode). Actually modifying these settings is not allowed by the security model of Windows Phone (C# only)

Platform-specific extension library to enable real-life use cases (C#)

  • Business card (vCard): convert a Contact from the user’s address book directly to a vCard record (Windows 8, Windows Phone 8)
  • iCalendar: store appointments and events on tags, integrates with WinRT calendar classes (Windows 8, alpha release)
  • Image: images in various format on NFC tags or embedded in a Smart Poster. Includes de/encoding of JPEG, PNG, GIF and other file formats (Windows 8)

Download

The library is released under the open source LGPL license, which allows using the apps for free both in open and commercial, closed source apps. The full source code and documentation is available on GitHub.