Class NDEFRecord
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalNDEFRecord interface of the Web NFC API provides data that can be read from, or written to, compatible NFC devices, e.g., NFC tags supporting NDEF.
[Value("NDEFRecord")]
public class NDEFRecord
- Inheritance
-
NDEFRecord
- Inherited Members
Remarks
Constructors
NDEFRecord()
public NDEFRecord()
NDEFRecord(NDEFRecordInit)
NOTE
ExperimentalNDEFRecord()constructor of the Web NFC API returns a
newly constructed NDEFRecord object that represents data that can be
read from, or written to, compatible NFC devices; e.g., NFC tags supporting NDEF.
public NDEFRecord(NDEFRecordInit recordInit)
Parameters
recordInitNDEFRecordInit
Remarks
Properties
Data
NOTE
Experimentaldataproperty of the NDEFRecord interface returns a
DataView containing the raw bytes of the record's payload.
[Value("data")]
public DataView? Data { get; }
Property Value
Remarks
Encoding
NOTE
Experimentalencodingproperty of the NDEFRecord interface returns the encoding of
a textual payload, or
null otherwise.
[Value("encoding")]
public string? Encoding { get; }
Property Value
- string
A string which can be one of the following:
"utf-8","utf-16","utf-16le", or"utf-16be".
Remarks
Id
NOTE
Experimentalid property of theNDEFRecord interface returns the record identifier, which is an
absolute or relative URL used to identify the record.
[Value("id")]
public string? Id { get; }
Property Value
- string
A string.
Remarks
This identifier is created by the generator of the record which is solely responsible
for enforcing record identifier uniqueness. Web NFC does not sign the NFC content, thus
record consumer should not make any assumptions about integrity or authenticity of the
identifier or any other part of the records.
Lang
NOTE
Experimentallangproperty of the NDEFRecord interface returns the language of
a textual payload, or
null if one was not supplied.
[Value("lang")]
public string? Lang { get; }
Property Value
- string
A string.
Remarks
The record might be missing a language tag, for example, if the recorded information is
not locale-specific.
-HTML lang attribute, that declares content language of the document or its elements
-HTTP headers that declare content language: Content-Language and Accept-Language
MediaType
NOTE
ExperimentalmediaTypeproperty of the NDEFRecord interface returns the {{Glossary("MIME type")}} of the record. This value will be
null if recordType is not equal to "mime".
[Value("mediaType")]
public string? MediaType { get; }
Property Value
Remarks
RecordType
NOTE
ExperimentalrecordTypeproperty of the NDEFRecord interface returns the record type of the record.
[Value("recordType")]
public string RecordType { get; }
Property Value
- string
A string which can be one of the following:
Remarks
Methods
ToRecords()
NOTE
ExperimentaltoRecords()method of the NDEFRecord interface converts
Data to a sequence of records based on
RecordType, and returns the result. This allows
parsing the payloads of record types which may contain nested records, such
as smart poster and external type records.
[Value("toRecords")]
public List<NDEFRecord>? ToRecords()
Returns
- List<NDEFRecord>
A list of NDEFRecords.