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

Supported in Firefox OS 2.0 for certified-apps.
Available in privileged apps as of Firefox OS 2.2.

See also

Document Tags and Contributors

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