Class NfcNdefRecord
Definition
- Assembly:
- Tizen.Network.Nfc.dll
A class for the NDEF Record information. It allows applications to use the NDEF Record information.
C#Copypublic class NfcNdefRecord : IDisposable
- Inheritance
-
objectNfcNdefRecord
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic 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
C#Copypublic 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. |
Declaration
C#Copypublic 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
C#Copypublic 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
Declaration
C#Copypublic NfcEncodeType EncodeType { get; }
Property Value
Type | Description |
---|---|
NfcEncodeType |
Declaration
C#Copypublic byte[] Id { get; }
Property Value
Type | Description |
---|---|
byte[] |
Declaration
C#Copypublic string LanguageCode { get; }
Property Value
Type | Description |
---|---|
string |
Declaration
C#Copypublic string MimeType { get; }
Property Value
Type | Description |
---|---|
string |
Declaration
C#Copypublic byte[] Payload { get; }
Property Value
Type | Description |
---|---|
byte[] |
Declaration
C#Copypublic string Text { get; }
Property Value
Type | Description |
---|---|
string |
Declaration
C#Copypublic NfcRecordTypeNameFormat Tnf { get; }
Property Value
Type | Description |
---|---|
NfcRecordTypeNameFormat |
Declaration
C#Copypublic byte[] Type { get; }
Property Value
Type | Description |
---|---|
byte[] |
Declaration
C#Copypublic string Uri { get; }
Property Value
Type | Description |
---|---|
string |
Methods
Declaration
C#Copypublic void Dispose()
Declaration
C#Copyprotected ~NfcNdefRecord()