Class NfcCardEmulationAdapter
Definition
- Assembly:
 - Tizen.Network.Nfc.dll
 
A class for the NFC CardEmulation mode. It allows applications to handle Card Emulation informations.
public class NfcCardEmulationAdapter : IDisposable
  - Inheritance
 - 
      objectNfcCardEmulationAdapter
 
- Implements
 - 
      System.IDisposable
 
Methods
View SourceDisableCardEmulation()
Disables the card emulation mode.
Declaration
public void DisableCardEmulation()
  Exceptions
| Type | Condition | 
|---|---|
| System.NotSupportedException | Thrown when the NFC is not supported.  | 
      
| System.InvalidOperationException | Thrown when the method fails due to an invalid operation.  | 
      
DisableTransactionForegroundDispatch()
Disables the foreground dispatch for the "EVT_TRANSACTION" to the given application.
Declaration
public void DisableTransactionForegroundDispatch()
  Exceptions
| Type | Condition | 
|---|---|
| System.NotSupportedException | Thrown when the NFC is not supported.  | 
      
| System.InvalidOperationException | Thrown when the method fails due to an invalid operation.  | 
      
Dispose()
Dispose
Declaration
public void Dispose()
  EnableCardEmulation()
Enables the card emulation mode.
Declaration
public void EnableCardEmulation()
  Exceptions
| Type | Condition | 
|---|---|
| System.NotSupportedException | Thrown when the NFC is not supported.  | 
      
| System.InvalidOperationException | Thrown when the method fails due to an invalid operation.  | 
      
EnableTransactionForegroundDispatch()
Gives the priority to the foreground application when dispatching the transaction event.
Declaration
public void EnableTransactionForegroundDispatch()
  Exceptions
| Type | Condition | 
|---|---|
| System.NotSupportedException | Thrown when the NFC is not supported.  | 
      
| System.InvalidOperationException | Thrown when the method fails due to an invalid operation.  | 
      
~NfcCardEmulationAdapter()
NfcCardEmulationAdpater destructor.
Declaration
protected ~NfcCardEmulationAdapter()
  GetCardEmulationMode()
Gets the current card emulation mode.
Declaration
public NfcSecureElementCardEmulationMode GetCardEmulationMode()
  Returns
| Type | Description | 
|---|---|
| NfcSecureElementCardEmulationMode | Enumeration value for the NfcSecureElementCardEmulationMode.  | 
      
GetRegisteredAidInformation(NfcSecureElementType, NfcCardEmulationCategoryType)
Retrieves all registered AIDs.
Declaration
public IEnumerable<NfcRegisteredAidInformation> GetRegisteredAidInformation(NfcSecureElementType seType, NfcCardEmulationCategoryType category)
  Parameters
| Type | Name | Description | 
|---|---|---|
| NfcSecureElementType | seType | The type of the secure element.  | 
      
| NfcCardEmulationCategoryType | category | Enumeration value of the category.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<T><NfcRegisteredAidInformation> | The list of NfcRegisteredAidInformation objects.  | 
      
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.  | 
      
IsActivatedHandlerForAid(NfcSecureElementType, string)
Gets the state, whether an application to call this API is currently the activated handler for the specific AID.
Declaration
public bool IsActivatedHandlerForAid(NfcSecureElementType seType, string aid)
  Parameters
| Type | Name | Description | 
|---|---|---|
| NfcSecureElementType | seType | The type of the Secure Element.  | 
      
| string | aid | The application ID specified in the ISO/IEC 7816-4.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 'True' when application is currently the activated handler, otherwise 'False'.  | 
      
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.  | 
      
IsActivatedHandlerForCategory(NfcSecureElementType, NfcCardEmulationCategoryType)
Gets the state, whether an application to call this API is currently the activated handler for the category.
Declaration
public bool IsActivatedHandlerForCategory(NfcSecureElementType seType, NfcCardEmulationCategoryType category)
  Parameters
| Type | Name | Description | 
|---|---|---|
| NfcSecureElementType | seType | The type of the secure element.  | 
      
| NfcCardEmulationCategoryType | category | Enumeration value of the category.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 'True' when application is currently the activated handler, otherwise 'False'.  | 
      
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.  | 
      
RegisterAid(NfcSecureElementType, NfcCardEmulationCategoryType, string)
Registers the AID for a specific category.
Declaration
public void RegisterAid(NfcSecureElementType seType, NfcCardEmulationCategoryType category, string aid)
  Parameters
| Type | Name | Description | 
|---|---|---|
| NfcSecureElementType | seType | The type of the secure element.  | 
      
| NfcCardEmulationCategoryType | category | Enumeration value of the category.  | 
      
| string | aid | The application ID specified in the ISO/IEC 7816-4.  | 
      
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.  | 
      
SetPreferredApplication()
Sets the application as a preferred handler.
Declaration
public void SetPreferredApplication()
  Exceptions
| Type | Condition | 
|---|---|
| System.NotSupportedException | Thrown when the NFC is not supported.  | 
      
| System.InvalidOperationException | Thrown when the method fails due to an invalid operation.  | 
      
UnregisterAid(NfcSecureElementType, NfcCardEmulationCategoryType, string)
Unregisters a previously registered AID for the specified category.
Declaration
public void UnregisterAid(NfcSecureElementType seType, NfcCardEmulationCategoryType category, string aid)
  Parameters
| Type | Name | Description | 
|---|---|---|
| NfcSecureElementType | seType | The type of the secure element.  | 
      
| NfcCardEmulationCategoryType | category | Enumeration value of the category.  | 
      
| string | aid | The application ID specified in the ISO/IEC 7816-4.  | 
      
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.  | 
      
UnsetPreferredApplication()
Unsets the application as a preferred handler.
Declaration
public void UnsetPreferredApplication()
  Exceptions
| Type | Condition | 
|---|---|
| System.NotSupportedException | Thrown when the NFC is not supported.  | 
      
| System.InvalidOperationException | Thrown when the method fails due to an invalid operation.  | 
      
Events
View SourceEseSecureElementTransactionEvent
An event that is called when receiving the Secure Element (SIM/UICC (Universal Integrated Circuit Card)) transaction event for the 'ESE(SmartMX)' type.
Declaration
public event EventHandler<SecureElementTranscationEventArgs> EseSecureElementTransactionEvent
  Event Type
| Type | Description | 
|---|---|
| System.EventHandler<TEventArgs><SecureElementTranscationEventArgs> | 
HostCardEmulationEvent
An event that is called when receiving the HCE (Host Card Emulation) event.
Declaration
public event EventHandler<HostCardEmulationEventArgs> HostCardEmulationEvent
  Event Type
| Type | Description | 
|---|---|
| System.EventHandler<TEventArgs><HostCardEmulationEventArgs> | 
SecureElementEvent
An event that is called when receiving the Secure Element (SIM/UICC(Universal Integrated Circuit Card)) event.
Declaration
public event EventHandler<SecureElementEventArgs> SecureElementEvent
  Event Type
| Type | Description | 
|---|---|
| System.EventHandler<TEventArgs><SecureElementEventArgs> | 
UiccSecureElementTransactionEvent
An event that is called when receiving the Secure Element (SIM/UICC (Universal Integrated Circuit Card)) transaction event for the 'UICC' type.
Declaration
public event EventHandler<SecureElementTranscationEventArgs> UiccSecureElementTransactionEvent
  Event Type
| Type | Description | 
|---|---|
| System.EventHandler<TEventArgs><SecureElementTranscationEventArgs> |