MozNFC

MozNFC is the top level API for operating in NFC Reader/Writer mode, NFC P2P mode and NFC Card Emulation mode.

Note: This interface is accessed via the Navigator.mozNfc property.

Event Handlers

MozNFC.onpeerfound
The onpeerfound event callback function is called when a NFC device is detected. Available in Firefox OS 2.2+.
MozNFC.onpeerlost
The onpeerlost event callback function is called when the peer object detected in onpeerfound is no longer available to the application (for example when the peer device moves out of range.)
MozNFC.ontagfound
The ontagfound event callback function is called when a NFC Tag is detected. Available in Firefox OS 2.2+.
MozNFC.ontaglost
The ontaglost event callback function is called when the tag object detected in ontagfound is no longer available to the application. (for example when the tag moves out of range) Available in FirefoxOS 2.2+.

Specifications

The NFC implementation in Gecko follows the NFC Forum specifications.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support

No support

No support No support No support No support
Feature Android Firefox Mobile (Gecko) Firefox OS (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support No support No support 2.0 moz [1] No support No support No support

[1] Available in privileged apps as of Firefox OS 2.2; certified-only before that.

See also

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, fscholz, teoli, allstars.chh, psiddh, lgarner
 Last updated by: chrisdavidmills,