gsma Transaction Event

464 views
Skip to first unread message

Rabby Alam

unread,
Mar 23, 2015, 6:38:36 AM3/23/15
to seek-for...@googlegroups.com
Hello I'm working on a UICC based payment app for android.The app needs to know when the transaction in happening.I have found some permission and action regarding this.
like    
 <uses-permission android:name="nfc.hci.permission.TRANSACTION_EVENT" />
 <uses-permission android:name="android.permission.NFC_TRANSACTION" />

 <uses-permission android:name="com.gsma.services.nfc.permission.TRANSACTION_EVENT" />

Action 
 <action android:name="android.nfc.action.TRANSACTION_DETECTED"/>
 <action android:name="com.gsma.services.nfc.TRANSACTION_EVENT" />


But the the activity is not launching when I Perform transaction.I don't have any POS terminal.I'm simulating POS terminal with Omnikey 5321 contactless reader.

Can any one tell exactly when transaction_event action is triggered? is it broadcast after receiving the Select APDU? or After completion of payment? or the POS terminal dose some thing to trigger this event? 

Thanks in advance :)



Danny Sung

unread,
Mar 23, 2015, 6:56:25 PM3/23/15
to seek-for...@googlegroups.com
There are several things that you need to make sure:

1. Your Android device supports the NFC transaction event based on GSMA spec.
2. The applet can fire a NFC transaction event from UICC
3. Your app has the permission to receive the NFC transaction events

Rabby Alam

unread,
Mar 24, 2015, 1:09:40 AM3/24/15
to seek-for...@googlegroups.com
1.I have tested in Samsung Galaxy S3 and S5. They support GSMA spec.
 
      3. After adding  "<uses-permission android:name="nfc.hci.permission.TRANSACTION_EVENT" />" I can see a transaction event permission in the app's permission list in Application Manager.

How can I know that, is the applet capable of firing NFC transaction event? I'm using VMPA applet.

Usman Farooq

unread,
Mar 24, 2015, 4:29:37 AM3/24/15
to seek-for...@googlegroups.com

Well, if you can touch your device against a contactless reader, you will certainly know. You said it is a VMPA, you would need a Visa contactless app running on the reader.

Thanks
Usman

--

---
You received this message because you are subscribed to the Google Groups "seek-for-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seek-for-andro...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rabby Alam

unread,
Mar 24, 2015, 5:12:26 AM3/24/15
to seek-for...@googlegroups.com
Thanks Usman,
Currently I'm using Omnikey 5321 contactless reader for sending APDU to the UICC. The  APDU,which are required for transaction,I'm sending them from a desktop application.
I don't have visa contactless app for the reader.Can you give some suggestion why I need that and how can I get that?
Here is my manifest file.Again thanks for your time :)
 <uses-permission android:name="android.permission.NFC" />
    <uses-permission android:name="nfc.hci.permission.TRANSACTION_EVENT" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.gsma.services.nfc.permission.TRANSACTION_EVENT" />
    <uses-feature android:name="android.hardware.nfc" android:required="true" />
    <uses-library android:name="com.gsma.services.nfc" android:required="true"/>
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
<uses-library android:name="org.simalliance.openmobileapi" android:required="false"/>
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
</activity>
        <activity android:name=".TransactionActivity"
            >
<intent-filter>
                <action android:name="android.nfc.action.TRANSACTION_DETECTED"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data
                    android:scheme="nfc"
                    android:host="secure"
                    android:port="0"
                    android:pathPattern="/SIM1.*/a0000000031010"
                    android:path="/a0000000031010"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.gsma.services.nfc.TRANSACTION_EVENT" />

                <category android:name="android.intent.category.DEFAULT" />

                <data
                    android:host="secure"
                    android:pathPattern="/SIM1.*/a0000000031010"
                    android:scheme="nfc" />
            </intent-filter>

         </activity>
<service
            android:name=".OffHostApduServiceIm"
            android:label="@string/app_name"
            android:permission="android.permission.BIND_NFC_SERVICE">
<intent-filter>
                <action android:name="android.nfc.cardemulation.action.OFF_HOST_APDU_SERVICE"/>
                <action android:name="android.nfc.action.TECH_DISCOVERED"/>
</intent-filter>
<meta-data
                android:name="android.nfc.cardemulation.off_host_apdu_service"
                android:resource="@xml/proximity_off_host_apduservice"/>
        </service>

    </application>

Danny Sung

unread,
Mar 25, 2015, 1:45:33 PM3/25/15
to seek-for...@googlegroups.com
> 1.I have tested in Samsung Galaxy S3 and S5. They support GSMA spec.

I doubt it although I might be wrong.

> How can I know that, is the applet capable of firing NFC transaction event? I'm using VMPA applet

It depends on the version of VMPA applet and how you provisioned the VMPA applet.   There is a flag you need to turn on when provisioning/installing.

I'm attaching a test applet which can fire a nfc transaction event when the following APDU commands sent from a reader:

/select A000000485000A01080000
/send 90BB000000

Note: the info for the test applet installation
Package AID : A000000485000A010800
Class AID      : A000000485000A01080000
Install data privileges : 03000000
install data parameters app specific : C900
install data parameters sys specific  : EF00
install data parameters ts102226 specific  : none

Good luck!


On Monday, March 23, 2015 at 5:38:36 AM UTC-5, Rabby Alam wrote:
transevent.cap

Rabby Alam

unread,
Apr 1, 2015, 1:33:23 AM4/1/15
to seek-for...@googlegroups.com
Hello Danny,

Thank you very much for your guide line.I have install the cap file and send the apdus you have mentioned.But Still I got no luck.

 After adding "ncf.hci.permission.TRANSACTION_EVENT"  permission,I can see it in App Info. That is why I think the device supports transaction_event.


Here is the apdus I have tried. 

Install: 80 E6 0C 00 2D 0A A000000485000A010800 0B A000000485000A01080000 0B A000000485000A01080000 03 000000 04 C900 EF00 0000

Select command: 00A404000BA000000485000A0108000000
           response: A19000

Command: 90BB000000
           response: A19000


And thanks again for guiding me.

Regards 
Rabby


      


marc.o...@gi-de.com

unread,
Aug 24, 2015, 4:16:32 AM8/24/15
to seek-for-android
Hi all,

From our experience, capturing a transaction event from android is a hard task. The problem is there are many ways to do it (read: intents to listen to and permissions to declare) and they differ from device to device. The best way to get lucky is to declare all of them, but thats no success guarantee :-)

Hope this helps,
Marc

Daejin Yeon

unread,
Feb 26, 2018, 2:43:20 AM2/26/18
to seek-for-android
Dear,

I want to test this GSMA NFC API but I cannot find 'nfc_hci_services.jar', 
Could you share the ''nfc_hci_services.jar' to me?
and for the NFC API test, could you give me advice which mobile should use for GSMA API test.

Thank you for your advice.

BR,
  David
Reply all
Reply to author
Forward
0 new messages