private HostCardEmulationEventArgs _hceEventArgs = null;
private SecureElementEventArgs _seEventArgs = null;
+ public void HostCardEmulationActivatedCallback(object sender, HostCardEmulationEventArgs e)
+ {
+ if (e.HceEvent == NfcHceEvent.Activated)
+ {
+ _hceEventArgs = e;
+ }
+ }
+
+ public void HostCardEmulationDeactivatedCallback(object sender, HostCardEmulationEventArgs e)
+ {
+ if (e.HceEvent == NfcHceEvent.Deactivated)
+ {
+ _hceEventArgs = e;
+ }
+ }
+
+ public void HostCardEmulationApduReceivedCallback(object sender, HostCardEmulationEventArgs e)
+ {
+ if (e.HceEvent == NfcHceEvent.ApduReceived)
+ {
+ _hceEventArgs = e;
+ }
+ }
+
public void HostCardEmulationCallback(object sender, HostCardEmulationEventArgs e)
{
_hceEventArgs = e;
* 3. Register SE event handler
*/
_cardEmulationAdapter = NfcManager.GetCardEmulationAdapter();
- _cardEmulationAdapter.HostCardEmulationEvent += HostCardEmulationCallback;
+ _cardEmulationAdapter.HostCardEmulationEvent += HostCardEmulationActivatedCallback;
_cardEmulationAdapter.SecureElementEvent += SecureElementCallback;
/* TEST CODE */
* 2. Reset variables
*/
Assert.IsNotNull(_cardEmulationAdapter, "_cardEmulationAdapter should not be null");
- _cardEmulationAdapter.HostCardEmulationEvent -= HostCardEmulationCallback;
+ _cardEmulationAdapter.HostCardEmulationEvent -= HostCardEmulationActivatedCallback;
_cardEmulationAdapter.SecureElementEvent -= SecureElementCallback;
_cardEmulationAdapter = null;
* 3. Register SE event handler
*/
_cardEmulationAdapter = NfcManager.GetCardEmulationAdapter();
- _cardEmulationAdapter.HostCardEmulationEvent += HostCardEmulationCallback;
+ _cardEmulationAdapter.HostCardEmulationEvent += HostCardEmulationDeactivatedCallback;
_cardEmulationAdapter.SecureElementEvent += SecureElementCallback;
/* TEST CODE */
* 2. Reset variables
*/
Assert.IsNotNull(_cardEmulationAdapter, "_cardEmulationAdapter should not be null");
- _cardEmulationAdapter.HostCardEmulationEvent -= HostCardEmulationCallback;
+ _cardEmulationAdapter.HostCardEmulationEvent -= HostCardEmulationDeactivatedCallback;
_cardEmulationAdapter.SecureElementEvent -= SecureElementCallback;
_cardEmulationAdapter = null;
* 3. Register SE event handler
*/
_cardEmulationAdapter = NfcManager.GetCardEmulationAdapter();
- _cardEmulationAdapter.HostCardEmulationEvent += HostCardEmulationCallback;
+ _cardEmulationAdapter.HostCardEmulationEvent += HostCardEmulationApduReceivedCallback;
_cardEmulationAdapter.SecureElementEvent += SecureElementCallback;
/* TEST CODE */
* 2. Reset variables
*/
Assert.IsNotNull(_cardEmulationAdapter, "_cardEmulationAdapter should not be null");
- _cardEmulationAdapter.HostCardEmulationEvent -= HostCardEmulationCallback;
+ _cardEmulationAdapter.HostCardEmulationEvent -= HostCardEmulationApduReceivedCallback;
_cardEmulationAdapter.SecureElementEvent -= SecureElementCallback;
_cardEmulationAdapter = null;