NFCAndroid icon indicating copy to clipboard operation
NFCAndroid copied to clipboard

Request to check issue NFC can not read write with android version 12

Open khounchandaro opened this issue 2 years ago • 4 comments

I have problem with NFC android version 12 with my code cannot read and write tag.

URL : As the code we use this source code: https://github.com/underwindfall/NFCAndroid

Detail Information about problem: As the above URL code we use host-based card emulation (HCE) for write information via NFC device version 12. At previous time when I test this device with version 11 host-based card emulation (HCE) can write information as well and other devices can read. but when it's these devices upgrade to version 12, now cannot write and read anymore.

Could you please help use for how can we implement with that or you can make suggestion or guide use more about how to implement development for Payment via NFC tap to pay (phone to phone by mobile app).

Could you guide us how can we make payment via NFC tap to pay (phone to phone)? The case version 12 above now we don't have solution yet.

Thanks your for your support. We are waiting from your confirmation back.

Best regard.

khounchandaro avatar Apr 11 '22 07:04 khounchandaro

Hello, Currently, I don't have a plan to work on this project besides I don't have a device that supports Android 12 to test it.

PR is welcome if you find a solution to solve the issue you described.

underwindfall avatar Apr 11 '22 15:04 underwindfall

@all, i have run it Android, and iOS reader. Writing text in Android app then reading from iOS/android works fine. Question :

  1. How can i write in iOS and Android can read that ? I meant , does iOS support for Host Card Simulation like this ? So that i can write then read from iOS as well.
  2. My ultimate intension is sending image(now trying with text only) through NFC, is it possible iOS<->Android vice versa ? JFYI: I don't want to use BLE or WIFI connection.

Someone please help me in someway.

jams032 avatar Jun 15 '22 09:06 jams032

@underwindfall Hey I'm also unable to read NFC data on Android 12 will it be possible to look into this issue it would be great help. From my understanding the problem is with the "READ_CAPABILITY_CONTAINER_RESPONSE" as when I used NXPInfo app to see the emulated tag information its passing info but its not emulating storage and so there is no Ndef Record which is creating issue for the reading part in Android 12. I have attached screenshot for the NXPInfo response. If you could kindly resolve this issue it would be great help. Looking for your positive response. Thank you Screenshot_20220616-122014_TagInfo

usmankubee avatar Jun 16 '22 08:06 usmankubee

It seems that reducing the Max Ndef size to 32K (7FFF) has some success on HCE working on Android 12 as per https://stackoverflow.com/questions/75932985/why-does-data-transfer-over-nfc-with-hce-only-work-with-android-lower-12

As even though the Type 4 spec says the max Ndef size in the CC is 64K, the spec notes that you can only read/write to 80FE, thus limiting the practical size.

It seems there was a change to Android to reduce the allowed to the more logical 32K

Zardozz avatar Apr 05 '23 17:04 Zardozz