Package com.gsma.services.nfc

GSMA Near Field Communication (NFC) API for Android devices.

See: Description

Package com.gsma.services.nfc Description

GSMA Near Field Communication (NFC) API for Android devices.

SE Transaction Intent

Description

Intent which is triggered when an HCI event EVT_TRANSACTION has occurred on a SE.

Actioncom.gsma.services.nfc.action.TRANSACTION_EVENT
MIME type-
URInfc://secure:0/[SEName]/[AID]

Within the URI field, [SEName] reflects the name of the originating SE, and SHALL be compliant with the naming conventions of the SIMalliance Open Mobile API. [AID] reflects the originating UICC applet identifier.

Transaction event data SHALL be set in the extended fields: com.gsma.services.nfc.extra.AID and com.gsma.services.nfc.extra.DATA.

com.gsma.services.extra.DATA

A mandatory field containing the payload conveyed in the HCI EVT_TRANSACTION that triggered the com.gsma.services.nfc.action.TRANSACTION_EVENT Intent

The payload transported in the DATA field shall be a ByteArray.

com.gsma.services.nfc.extra.AID

An optional field containing the card "Application Identifier" that triggered com.gsma.services.nfc.action.TRANSACTION_EVENT.

The payload transported in the AID field shall be a ByteArray.

Receive Mechanisms

Two mechanisms may be used for receiving this event: "Unicast" and "Multicast" as per TS.26 section 7.4.

Where the Unicast mechanism is selected, the framework SHALL ensure that TRANSACTION_EVENT is received by only one Activity. In the case of multiple Activity instances being registered to receive TRANSACTION_EVENT, the framework SHALL follow the priority scheme below:

  1. Android:priority level defined in the Intent filter SHALL be compared.
  2. In the event of multiple Activity instances having the same priority level, the earliest installed application package (APK) has a higher priority.

Where the Multicast mechanism is selected, the framework SHALL use the BroadcastReceiver mechanism to inform the selected Activity of the event.

Implementation guidelines

A possible programmatic approach to constructing a TS.26 compliant com.gsma.services.nfc.action.TRANSACTION_EVENT Intent might resemble the following:

   byte[] aid;
   byte[] data;
 
   ... code putting values into aid and data goes here 
 
   Intent i = new Intent();
   i.setAction("com.gsma.services.nfc.action.TRANSACTION_EVENT");
   i.putExtra("com.gsma.services.nfc.extra.AID", aid);
   i.putExtra("com.gsma.services.nfc.extra.DATA", data);
 
See Also:
com.gsma.services.utils.Handset.enableMultiEvt_transactionReception

This content is licensed under Apache 2.0
TS.26 V8.0 - October 2015