Class NfcNdefMessage
Definition
- Assembly:
- Tizen.Network.Nfc.dll
A class for the NDEF Message information. It allows applications to use the NDEF Message information.
public class NfcNdefMessage : IDisposable
- Inheritance
-
objectNfcNdefMessage
- Implements
-
System.IDisposable
Constructors
View SourceNfcNdefMessage()
Creates an object for the access point.
Declaration
public NfcNdefMessage()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the NFC is not supported. |
System.InvalidOperationException | Thrown when the method fails due to an invalid operation. |
Properties
View SourceRecordCount
The number of records in the NDEF message.
Declaration
public int RecordCount { get; }
Property Value
Type | Description |
---|---|
int |
Methods
View SourceAppendRecord(NfcNdefRecord)
Appends a record into the NDEF message.
Declaration
public bool AppendRecord(NfcNdefRecord record)
Parameters
Type | Name | Description |
---|---|---|
NfcNdefRecord | record | The NfcNdefRecord object that will be appended into the NDEF message. |
Returns
Type | Description |
---|---|
bool | Whether the record is appended successfully. |
Dispose()
Dispose
Declaration
public void Dispose()
~NfcNdefMessage()
NfcNdefMessage destructor.
Declaration
protected ~NfcNdefMessage()
GetRecord(int)
Gets a record by the index.
Declaration
public NfcNdefRecord GetRecord(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of a record ( starts from 0 ). |
Returns
Type | Description |
---|---|
NfcNdefRecord | The NfcNdefRecord object. |
InsertRecord(int, NfcNdefRecord)
Inserts a record at the index into the NDEF message.
Declaration
public bool InsertRecord(int index, NfcNdefRecord record)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of a record ( starts from 0 ). |
NfcNdefRecord | record | The NfcNdefRecord object that will be appended into the NDEF message. |
Returns
Type | Description |
---|---|
bool | Whether inserting the record succeeded. |
RemoveRecord(int)
Removes a record at the index into the NDEF message.
Declaration
public bool RemoveRecord(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of a record ( starts from 0 ). |
Returns
Type | Description |
---|---|
bool | Whether removing the record succeeded. |