In the past weeks I have hardly studied how to dialog with Credit Cards using APDUs. To manage all the different cards (EMV standard) I have to use NFC library to connect the card and then start to get APDU commands/responses to read the credit card data (ie. card number).
I have noticed that in the whole connection of the nfc card there are different behaviors:
Trying to connect a standard Visa card the connection is a breeze. See the log:
Then I tried to connect an Amex card and a Mastercard debit card. This is the log:
As you can notice after the correct connection the app goes in PAUSE UserClosed=true.
This bahavior causes (if the card is close to the device) a indefinite loop of Connections.
Also using Mastercard debit it works in this strange way.
Any suggestion?
Attached the simple app I used to test these behaviors.
I have noticed that in the whole connection of the nfc card there are different behaviors:
Trying to connect a standard Visa card the connection is a breeze. See the log:
B4X:
Logger connesso a: Telpo M1K
--------- beginning of main
** Service (starter) Destroy (ignored)**
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
action:android.intent.action.MAIN
** Activity (main) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create **
** Activity (main) Resume **
action:android.nfc.action.TECH_DISCOVERED
Techs: [android.nfc.tech.IsoDep, android.nfc.tech.NfcA]
getId:086C7AA4
Connected: true
B4X:
Logger connesso a: Telpo M1K
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
action:android.intent.action.MAIN
** Activity (main) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create **
** Activity (main) Resume **
action:android.nfc.action.TECH_DISCOVERED
Techs: [android.nfc.tech.IsoDep, android.nfc.tech.NfcA]
getId:04871D5A631090
Connected: true
** Activity (main) Pause, UserClosed = true **
This bahavior causes (if the card is close to the device) a indefinite loop of Connections.
Also using Mastercard debit it works in this strange way.
Any suggestion?
Attached the simple app I used to test these behaviors.