This API is available on Firefox OS for privileged or certified applications only.
MozNFCTag
は NDEF-コンパチな NFC を読み書き、検査するのに必要な基本機能を含みます。
メソッド
MozNFCTag.makeReadOnly()
- Calling
makeReadOnly()
will make the NDEF stored on this tag read only. Avalable in Firefox OS 2.2+. MozNFCTag.format()
- Formats this tag as NDEF-compatible. Avalable in Firefox OS 2.2+.
MozNFCTag.readNDEF()
readNDEF()
retrieves the NDEF contents stored on this Tag, and returns the NDEF as an array ofMozNDEFRecord
objects.MozNFCTag.writeNDEF()
writeNDEF()
takes an array ofMozNDEFRecord
objects, and writes them to a NDEF-compatible tag.
プロパティ
MozNFCTag.techList
読取専用- The supported NFC Technologies of this tag.
MozNFCTag.id
読取専用- The identifier of this tag.
MozNFCTag.type
読取専用- The type of this tag,
MozNFCTag.maxNDEFSize
読取専用- The maximum size of NDEF can be stored on this tag.
MozNFCTag.isReadOnly
読取専用- Indicate whether the NDEF content stored on this tag read-only or not.
MozNFCTag.isFormatable
読取専用- Inidicate whether this tag is NDEF-compatible or not.
MozNFCTag.canBeMadeReadOnly
読取専用- Indicate whether the NDEF stored on this tag could be configured as read-only or not.
MozNFCTag.isLost
読取専用- Indicate whether if this tag is already lost. (i.e. is moved out of range)
仕様
The NFC implementation in Gecko follows the NFC Forum specifications.
ブラウザ互換性
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support |
未サポート |
未サポート | 未サポート | 未サポート | 未サポート |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | 未サポート | 未サポート | 2.0 moz [1] | 未サポート | 未サポート | 未サポート |
[1] Available in privileged apps as of Firefox OS 2.2; certified-only before that.
こちらも見よ
- Using the NFC API
- Using the NFC emulator
- Introduction to NFC (fairly long reference doc, featuring general NFC terms, and some Nokia platform specifics.)