Class NfcTag
Definition
- Namespace:
- Tizen.Network.Nfc
- Assembly:
- Tizen.Network.Nfc.dll
- API Level:
- 3
The class for managing the Tag information.
public class NfcTag : IDisposable
- Inheritance
-
NfcTag
- Implements
Constructors
View SourceNfcTag()
Constructor of NfcTag
Declaration
public NfcTag()
Properties
View SourceIsSupportNdef
Whether the given NFC tag supports the NDEF messages.
Declaration
public bool IsSupportNdef { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 3
View SourceMaximumNdefSize
The maximum NDEF message size that can be stored in the NFC tag.
Declaration
public uint MaximumNdefSize { get; }
Property Value
Type | Description |
---|---|
UInt32 |
API Level: 3
View SourceNdefSize
The size of the NDEF message stored in the tag.
Declaration
public uint NdefSize { get; }
Property Value
Type | Description |
---|---|
UInt32 |
API Level: 3
View SourceType
The type of the NFC tag.
Declaration
public NfcTagType Type { get; }
Property Value
Type | Description |
---|---|
NfcTagType |
API Level: 3
Methods
View SourceDispose()
Dispose
Declaration
public void Dispose()
API Level: 3
View SourceFinalize()
NfcTag destructor.
Declaration
protected void Finalize()
ForeachInformation()
Retrieves all the tag information.
Declaration
public IEnumerable<NfcTagInformation> ForeachInformation()
Returns
Type | Description |
---|---|
IEnumerable<NfcTagInformation> | The list of the NfcTagInformation objects. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the NFC is not supported. |
InvalidOperationException | Thrown when the method fails due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/nfc
View SourceFormatNdefMessageAsync(Byte[])
Formats the detected tag that can store the NDEF message.
Declaration
public Task<NfcError> FormatNdefMessageAsync(byte[] keyValue)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | keyValue | The key value that may need to format the tag. |
Returns
Type | Description |
---|---|
Task<NfcError> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the NFC is not supported. |
ArgumentException | Thrown when method fails due to an invalid parameter. |
InvalidOperationException | Thrown when the method fails due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/nfc
View SourceReadNdefMessageAsync()
Reads the NDEF formatted data from the NFC tag.
Declaration
public Task<NfcNdefMessage> ReadNdefMessageAsync()
Returns
Type | Description |
---|---|
Task<NfcNdefMessage> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the NFC is not supported. |
InvalidOperationException | Thrown when the method fails due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/nfc
View SourceTransceiveAsync(Byte[])
Transceives the data of the raw format card.
Declaration
public Task<byte[]> TransceiveAsync(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | buffer | The binary data for a parameter or additional commands. |
Returns
Type | Description |
---|---|
Task<Byte[]> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the NFC is not supported. |
ArgumentException | Thrown when the method fails due to an invalid parameter. |
InvalidOperationException | Thrown when the the method fails due to an invalid operation. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/nfc
View SourceWriteNdefMessageAsync(NfcNdefMessage)
Writes the NDEF formatted data.
Declaration
public Task<NfcError> WriteNdefMessageAsync(NfcNdefMessage ndefMessage)
Parameters
Type | Name | Description |
---|---|---|
NfcNdefMessage | ndefMessage | The NfcNdefMessage object. |
Returns
Type | Description |
---|---|
Task<NfcError> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when the NFC is not supported. |
ArgumentException | Thrown when the method fails due to an invalid parameter. |
InvalidOperationException | Thrown when the method fails due to an invalid operation. |