简体   繁体   中英

Why android NFC can read some contactless emv credit cads but not others?

I already looked at this question: Reading Visa payWave Credit Card Details via NFC on Android

and I have started writing an app that can read my Visa contactless card but when I tap a Visa Contactless Debit I get nothing, not even a hint that nfc card detected. This is my code to setup nfc adapter so that it can read contactless cards:

 val tagFilters = arrayOf(discoveryTag, discoveryTech)
 adapter.enableReaderMode(this, this, NfcAdapter.FLAG_READER_NFC_A or NfcAdapter.FLAG_READER_NFC_B, null)
 adapter.enableForegroundDispatch(this, pi, tagFilters, null)

and the intent that gets fired when I tap a contactless EMV card:

override fun onNewIntent(intent: Intent?) {
    super.onNewIntent(intent)

    // gets a tag object
    val tagFromIntent = intent?.getParcelableExtra<Tag>(NfcAdapter.EXTRA_TAG)
    Log.i("NFC_TEST", tagFromIntent.toString())

    // it is better to iterate through the tech list and make sure it is what we want
    // tagFromIntent?.techList!![0]

    // get an instance of the IsoDep
    val isoDep = IsoDep.get(tagFromIntent)
    if(isoDep == null) {
        Log.i("NFC_TEST", "Failed to read card")
        return
    }
}

Is there something about the AID that would be different on the Visa contactless vs Visa Debit contactless? But still I should get some detection of the contactless card.

I do not want to use triangle or square devices so please do not suggest those. I really would like to utilize contactless tap feature on the phone.

I am using Google Nexus 4 for my testing.

Check that the card you trying to read have contactless logo on it. There are stil a lot of payment cards with chip and swipe only. ie without contactless interface at all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM