Class NDEFReader
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalNDEFReader interface of the Web NFC API is used to read from and write data to compatible NFC devices, e.g., NFC tags supporting NDEF, when these devices are within the reader's magnetic induction field.
[Value("NDEFReader")]
public class NDEFReader : EventTarget
- Inheritance
-
NDEFReader
- Inherited Members
Remarks
Constructors
NDEFReader()
NOTE
ExperimentalNDEFReader()constructor of the NDEFReader interface returns a
new
NDEFReader object, which is used to read NDEF messages fromcompatible NFC devices, e.g., NDEF tags, within the reader's magnetic induction
field.
public NDEFReader()
Remarks
Properties
Onreading
[Value("onreading")]
public EventHandlerNonNull Onreading { get; set; }
Property Value
Onreadingerror
[Value("onreadingerror")]
public EventHandlerNonNull Onreadingerror { get; set; }
Property Value
Methods
MakeReadOnly(NDEFMakeReadOnlyOptions)
[Value("makeReadOnly")]
public Task<GlobalObject.Undefined> MakeReadOnly(NDEFMakeReadOnlyOptions options = null)
Parameters
optionsNDEFMakeReadOnlyOptions
Returns
Scan(NDEFScanOptions)
NOTE
Experimentalscan() method of the NDEFReader interface activates a reading device and returns a {{jsxref("Promise")}} that either resolves when an NFC tag read operation is scheduled or rejects if a hardware or permission error is encountered. This method triggers a permission prompt if the "nfc" permission has not been previously granted.
[Value("scan")]
public Task<GlobalObject.Undefined> Scan(NDEFScanOptions options = null)
Parameters
optionsNDEFScanOptions
Returns
- Task<GlobalObject.Undefined>
A Promise that resolves immediately after
scheduling read operations for the NFC adapter.
Remarks
Write(Union179, NDEFWriteOptions)
NOTE
Experimentalwrite() method of the NDEFReader interface attempts to write an NDEF message to a tag and returns a {{jsxref("Promise")}} that either resolves when a message has been written to the tag or rejects if a hardware or permission error is encountered. This method triggers a permission prompt if the "nfc" permission has not been previously granted.
[Value("write")]
public Task<GlobalObject.Undefined> Write(Union179 message, NDEFWriteOptions options = null)
Parameters
messageUnion179optionsNDEFWriteOptions
Returns
- Task<GlobalObject.Undefined>
A Promise that either resolves when a message has been written to the tag or rejects if a hardware or permission error is encountered.