Class NfcNdefRecord
Definition
- Assembly:
- Tizen.Network.Nfc.dll
A class for the NDEF Record information. It allows applications to use the NDEF Record information.
public class NfcNdefRecord : IDisposable
- Inheritance
-
objectNfcNdefRecord
- Implements
-
System.IDisposable
Constructors
View SourceNfcNdefRecord(string, byte[], uint)
Creates a record with the mime type payload.
Declaration
public NfcNdefRecord(string mimeType, byte[] data, uint dataSize)
Parameters
Type | Name | Description |
---|---|---|
string | mimeType | The mime type [RFC 2046] (ex. text/plain, image/jpeg ). This value is stored in the type field. |
byte[] | data | The data in the form of the bytes array. |
uint | dataSize | The size of the data. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the NFC is not supported. |
System.ArgumentException | Thrown when the method fails due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method fails due to an invalid operation. |
NfcNdefRecord(string, string, NfcEncodeType)
Creates a record with the text type payload.
Declaration
public NfcNdefRecord(string text, string languageCode, NfcEncodeType encode)
Parameters
Type | Name | Description |
---|---|---|
string | text | The encoded text. |
string | languageCode | The language code string value followed by the IANA [RFC 3066] (ex: en-US, ko-KR). |
NfcEncodeType | encode | The encoding type. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the NFC is not supported. |
System.ArgumentException | Thrown when the method fails due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method fails due to an invalid operation. |
NfcNdefRecord(string)
Creates a record with the URI type payload.
Declaration
public NfcNdefRecord(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri | The URI string that will be stored in the payload. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the NFC is not supported. |
System.ArgumentException | Thrown when the method fails due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method fails due to an invalid operation. |
NfcNdefRecord(NfcRecordTypeNameFormat, byte[], byte[], byte[], uint)
Creates a record with a given parameter value.
Declaration
public NfcNdefRecord(NfcRecordTypeNameFormat format, byte[] type, byte[] id, byte[] payload, uint paloadLength)
Parameters
Type | Name | Description |
---|---|---|
NfcRecordTypeNameFormat | format | The type name format. |
byte[] | type | The specified type name. |
byte[] | id | The record ID. |
byte[] | payload | The payload of this record. |
uint | paloadLength | The byte size of the payload. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the NFC is not supported. |
System.ArgumentException | Thrown when the method fails due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method fails due to an invalid operation. |
Properties
View SourceEncodeType
The encoding type of the text type NDEF record.
Declaration
public NfcEncodeType EncodeType { get; }
Property Value
Type | Description |
---|---|
NfcEncodeType |
Id
The record ID.
Declaration
public byte[] Id { get; }
Property Value
Type | Description |
---|---|
byte[] |
LanguageCode
The language code of the text type NDEF record.
Declaration
public string LanguageCode { get; }
Property Value
Type | Description |
---|---|
string |
MimeType
The mime type of the mime type NDEF record.
Declaration
public string MimeType { get; }
Property Value
Type | Description |
---|---|
string |
Payload
The record payload.
Declaration
public byte[] Payload { get; }
Property Value
Type | Description |
---|---|
byte[] |
Text
The text of the text type NDEF record.
Declaration
public string Text { get; }
Property Value
Type | Description |
---|---|
string |
Tnf
The record TNF (Type Name Format) value.
Declaration
public NfcRecordTypeNameFormat Tnf { get; }
Property Value
Type | Description |
---|---|
NfcRecordTypeNameFormat |
Type
The record type.
Declaration
public byte[] Type { get; }
Property Value
Type | Description |
---|---|
byte[] |
Uri
The URI of the URI type NDEF record.
Declaration
public string Uri { get; }
Property Value
Type | Description |
---|---|
string |
Methods
View SourceDispose()
Dispose
Declaration
public void Dispose()
~NfcNdefRecord()
NfcNdefRecord destructor.
Declaration
protected ~NfcNdefRecord()