Class NfcNdefRecord

    Definition

    Namespace:
    Tizen.Network.Nfc
    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
    object
    NfcNdefRecord
    Implements
    System.IDisposable

    Constructors

    View Source

    NfcNdefRecord(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.

    View Source

    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.

    View Source

    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.

    View Source

    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 Source

    EncodeType

    The encoding type of the text type NDEF record.

    Declaration
    public NfcEncodeType EncodeType { get; }
    Property Value
    Type Description
    NfcEncodeType
    View Source

    Id

    The record ID.

    Declaration
    public byte[] Id { get; }
    Property Value
    Type Description
    byte[]
    View Source

    LanguageCode

    The language code of the text type NDEF record.

    Declaration
    public string LanguageCode { get; }
    Property Value
    Type Description
    string
    View Source

    MimeType

    The mime type of the mime type NDEF record.

    Declaration
    public string MimeType { get; }
    Property Value
    Type Description
    string
    View Source

    Payload

    The record payload.

    Declaration
    public byte[] Payload { get; }
    Property Value
    Type Description
    byte[]
    View Source

    Text

    The text of the text type NDEF record.

    Declaration
    public string Text { get; }
    Property Value
    Type Description
    string
    View Source

    Tnf

    The record TNF (Type Name Format) value.

    Declaration
    public NfcRecordTypeNameFormat Tnf { get; }
    Property Value
    Type Description
    NfcRecordTypeNameFormat
    View Source

    Type

    The record type.

    Declaration
    public byte[] Type { get; }
    Property Value
    Type Description
    byte[]
    View Source

    Uri

    The URI of the URI type NDEF record.

    Declaration
    public string Uri { get; }
    Property Value
    Type Description
    string

    Methods

    View Source

    Dispose()

    Dispose

    Declaration
    public void Dispose()
    View Source

    ~NfcNdefRecord()

    NfcNdefRecord destructor.

    Declaration
    protected ~NfcNdefRecord()

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX