NFC / NDEF Library for Proximity APIs  4.1.0
Easily parse and create NDEF records with the Windows Proximity APIs / Near Field Communication NFC.
Public Types | Public Member Functions | Static Public Member Functions | Properties | List of all members
NdefLibrary.Ndef.NdefSpActRecord Class Reference

The Action record is a Local Type specific to the Smart Poster. More...

Inheritance diagram for NdefLibrary.Ndef.NdefSpActRecord:
NdefLibrary.Ndef.NdefRecord

Public Types

enum  NfcActionType { NfcActionType.DoAction = 0, NfcActionType.SaveForLater, NfcActionType.OpenForEditing, NfcActionType.Rfu }
 Type of the action, according to the NFC Forum Smart Poster specification. More...
 
- Public Types inherited from NdefLibrary.Ndef.NdefRecord
enum  TypeNameFormatType {
  TypeNameFormatType.Empty = 0x00, TypeNameFormatType.NfcRtd = 0x01, TypeNameFormatType.Mime = 0x02, TypeNameFormatType.Uri = 0x03,
  TypeNameFormatType.ExternalRtd = 0x04, TypeNameFormatType.Unknown = 0x05, TypeNameFormatType.Unchanged = 0x06, TypeNameFormatType.Reserved = 0x07
}
 Standardized type name formats, as defined by the NDEF record specification from the Nfc Forum. More...
 

Public Member Functions

 NdefSpActRecord ()
 Create an empty Action record, to be used within a Smart Poster message. Automatically creates the payload and sets it to the default DoAction. More...
 
 NdefSpActRecord (NdefRecord other)
 Create an action record based on the record passed through the argument. More...
 
- Public Member Functions inherited from NdefLibrary.Ndef.NdefRecord
 NdefRecord ()
 Create an empty record, not setting any information. More...
 
 NdefRecord (TypeNameFormatType tnf, byte[] type)
 Create a new record with the specified type name format and type. Doesn't set the payload and ID. More...
 
 NdefRecord (NdefRecord other)
 Create a new record, copying the information of the record sent through the parameter. More...
 
Type CheckSpecializedType (bool checkForSubtypes)
 Checks the type name format and type of this record and returns the appropriate specialized class, if one is available and known for this record type. More...
 
virtual bool CheckIfValid ()
 Checks if the contents of the record are valid; throws an exception if a problem is found, containing a textual description of the issue. More...
 

Static Public Member Functions

static bool IsRecordType (NdefRecord record)
 Checks if the record sent via the parameter is indeed an Action record. More...
 

Properties

NfcActionType NfcAction [get, set]
 Defines how the device should handle the linked content. DoAction per default. More...
 
- Properties inherited from NdefLibrary.Ndef.NdefRecord
TypeNameFormatType TypeNameFormat [get, set]
 Indicates the structure of the value of the TYPE field. More...
 
virtual byte [] Type [get, set]
 An identifier describing the type of the payload. More...
 
byte [] Id [get, set]
 An identifier in the form of a URI reference. More...
 
virtual byte [] Payload [get, set]
 The application data carried within an NDEF record. More...
 

Additional Inherited Members

- Protected Attributes inherited from NdefLibrary.Ndef.NdefRecord
byte [] _type
 Byte array storing raw contents of the type. Use Type property to access it whenever possible. More...
 
byte [] _payload
 Byte array storing raw contents of the payload. Use Payload property to access it whenever possible. More...
 

Detailed Description

The Action record is a Local Type specific to the Smart Poster.

It suggests a course of action that the device should do with the content. The NFC Local Type Name for the action is "act" (0x61 0x63 0x74). The action record is defined as having a local scope only, and therefore it has meaning only within a Smart Poster record. A lone "act"-record SHALL be considered an error.

The device MAY ignore this suggestion. The default (i.e., the Action record is missing from the Smart Poster) is not defined. For example, the device might show a list of options to the user.

(Information taken from NFC Forum Smart Poster NDEF record specifications)

Member Enumeration Documentation

◆ NfcActionType

Type of the action, according to the NFC Forum Smart Poster specification.

Enumerator
DoAction 

Do the action (send the SMS, launch the browser, make the telephone call).

SaveForLater 

Save for later (store the SMS in INBOX, put the URI in a bookmark, save the telephone number in contacts).

OpenForEditing 

Open for editing (open an SMS in the SMS editor, open the URI in an URI editor, open the telephone number for editing).

Rfu 

Reserved for future use.

Constructor & Destructor Documentation

◆ NdefSpActRecord() [1/2]

NdefLibrary.Ndef.NdefSpActRecord.NdefSpActRecord ( )

Create an empty Action record, to be used within a Smart Poster message. Automatically creates the payload and sets it to the default DoAction.

◆ NdefSpActRecord() [2/2]

NdefLibrary.Ndef.NdefSpActRecord.NdefSpActRecord ( NdefRecord  other)

Create an action record based on the record passed through the argument.

Internalizes and parses the payload of the original record. The original record has to be an action record as well.

Parameters
otherAction record to copy into this record.

Member Function Documentation

◆ IsRecordType()

static bool NdefLibrary.Ndef.NdefSpActRecord.IsRecordType ( NdefRecord  record)
static

Checks if the record sent via the parameter is indeed an Action record.

Only checks the type and type name format, doesn't analyze if the payload is valid.

Parameters
recordRecord to check.
Returns
True if the record has the correct type and type name format to be an Action record, false if it's a different record.

Property Documentation

◆ NfcAction

NfcActionType NdefLibrary.Ndef.NdefSpActRecord.NfcAction
getset

Defines how the device should handle the linked content. DoAction per default.


The documentation for this class was generated from the following file: