Class NfcNdefRecord

Definition

Namespace:
Tizen.Network.Nfc
Assembly:
Tizen.Network.Nfc.dll
API Level:
3

A class for the NDEF Record information. It allows applications to use the NDEF Record information.

C#
Copy
public class NfcNdefRecord : IDisposable
Inheritance
System.Object
NfcNdefRecord
Implements
System.IDisposable

Constructors

View Source

NfcNdefRecord(String)

Creates a record with the URI type payload.

Declaration
C#
Copy
public NfcNdefRecord(string uri)
Parameters
Type Name Description
System.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.

API Level: 3
View Source

NfcNdefRecord(String, Byte[], UInt32)

Creates a record with the mime type payload.

Declaration
C#
Copy
public NfcNdefRecord(string mimeType, byte[] data, uint dataSize)
Parameters
Type Name Description
System.String mimeType

The mime type [RFC 2046] (ex. text/plain, image/jpeg ). This value is stored in the type field.

System.Byte[] data

The data in the form of the bytes array.

System.UInt32 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.

API Level: 3
View Source

NfcNdefRecord(String, String, NfcEncodeType)

Creates a record with the text type payload.

Declaration
C#
Copy
public NfcNdefRecord(string text, string languageCode, NfcEncodeType encode)
Parameters
Type Name Description
System.String text

The encoded text.

System.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.

API Level: 3
View Source

NfcNdefRecord(NfcRecordTypeNameFormat, Byte[], Byte[], Byte[], UInt32)

Creates a record with a given parameter value.

Declaration
C#
Copy
public NfcNdefRecord(NfcRecordTypeNameFormat format, byte[] type, byte[] id, byte[] payload, uint paloadLength)
Parameters
Type Name Description
NfcRecordTypeNameFormat format

The type name format.

System.Byte[] type

The specified type name.

System.Byte[] id

The record ID.

System.Byte[] payload

The payload of this record.

System.UInt32 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.

API Level: 3

Properties

View Source

EncodeType

The encoding type of the text type NDEF record.

Declaration
C#
Copy
public NfcEncodeType EncodeType { get; }
Property Value
Type Description
NfcEncodeType
API Level: 3
View Source

Id

The record ID.

Declaration
C#
Copy
public byte[] Id { get; }
Property Value
Type Description
System.Byte[]
API Level: 3
View Source

LanguageCode

The language code of the text type NDEF record.

Declaration
C#
Copy
public string LanguageCode { get; }
Property Value
Type Description
System.String
API Level: 3
View Source

MimeType

The mime type of the mime type NDEF record.

Declaration
C#
Copy
public string MimeType { get; }
Property Value
Type Description
System.String
API Level: 3
View Source

Payload

The record payload.

Declaration
C#
Copy
public byte[] Payload { get; }
Property Value
Type Description
System.Byte[]
API Level: 3
View Source

Text

The text of the text type NDEF record.

Declaration
C#
Copy
public string Text { get; }
Property Value
Type Description
System.String
API Level: 3
View Source

Tnf

The record TNF (Type Name Format) value.

Declaration
C#
Copy
public NfcRecordTypeNameFormat Tnf { get; }
Property Value
Type Description
NfcRecordTypeNameFormat
API Level: 3
View Source

Type

The record type.

Declaration
C#
Copy
public byte[] Type { get; }
Property Value
Type Description
System.Byte[]
API Level: 3
View Source

Uri

The URI of the URI type NDEF record.

Declaration
C#
Copy
public string Uri { get; }
Property Value
Type Description
System.String
API Level: 3

Methods

View Source

Dispose()

Dispose

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Finalize()

NfcNdefRecord destructor.

Declaration
C#
Copy
protected void Finalize()

Implements

System.IDisposable