You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have a device running the HCE and another one running "readnfcmessage", the reader is always pushing as the intent action "android.intent.action.MAIN" and nothing in there. Why is the intent action this (even though the app is already open) and the phone is vibrating because an NFC chip was found?
Same issue here even when I approach a NDEF-formatted NFC tag (which for instance I can read from NFC tools on the same device). I tried changing the manifest accordingly to what they say here, but with no success. Was any of you able to get it working?
I also tried updating the nfc_tech_filter like this, but I'm still getting the same wrong intent...
I found this repository https://github.com/nguyencongtu2004/NFC-Demo that has a code able to read tags. I put the code from this repo there and I'm now able to read tags. Currently working on getting the HCE part of the code working.
If anyone with more Android development experience can please tell me what's the difference between the two projects (I'm ignorant and I just checked the AndroidManifest and Gradle; they look more or less the same), it would be really cool!
0x07.toByte(), // Lc field - Number of bytes present in the data field of the command
0xD2.toByte(),
0x76.toByte(),
0x00.toByte(),
0x00.toByte(),
0x85.toByte(),
0x01.toByte(),
0x01.toByte(), // NDEF Tag Application name
0x00.toByte(), // Le field - Maximum number of bytes expected in the data field of the response to the command
)
. Why is it just on app and not on the readnfcmessage?
I also read your comment on StackOverflow: https://stackoverflow.com/questions/29122848/ndef-message-with-hce-android, but i quite haven't understood. Were you able to emulate the first authentication code message to be processed by the HCE app, so that the reader should just send the binary read message or am I getting something wrong here?
PS: If that's true, I haven't understood how you were able to skip the first authentication message to be processed by the HCE app.
@kevin930321 what do you mean by APK? If you go to my repo you can check the GIF. There's not much point in sharing the APK since it is useless (only transferring a string from a phone to the other). If you want it I can share it still, would you like to share an email/Telegram/whatever I can send the APK to?
Activity
leonardosetiadi commentedon Jan 22, 2024
Same to me, any solution for this? @markusbug did you find any other approach?
kevin930321 commentedon Jul 30, 2024
@markusbug @leonardosetiadi I tried to build the the app but it keeps failing, Can you guys provide the apk file pls (in .zip), tks.
galihif commentedon Aug 28, 2024
@markusbug it happens to me too
albertoZurini commentedon Sep 26, 2024
Same issue here even when I approach a NDEF-formatted NFC tag (which for instance I can read from NFC tools on the same device). I tried changing the manifest accordingly to what they say here, but with no success. Was any of you able to get it working?
I also tried updating the nfc_tech_filter like this, but I'm still getting the same wrong intent...
albertoZurini commentedon Sep 28, 2024
I found this repository https://github.com/nguyencongtu2004/NFC-Demo that has a code able to read tags. I put the code from this repo there and I'm now able to read tags. Currently working on getting the HCE part of the code working.
If anyone with more Android development experience can please tell me what's the difference between the two projects (I'm ignorant and I just checked the AndroidManifest and Gradle; they look more or less the same), it would be really cool!
albertoZurini commentedon Sep 28, 2024
@underwindfall, I have a question: I didn't understand how the reader is able to trigger the HCE app. I can see here
NFCAndroid/app/src/main/res/xml/apduservice.xml
Line 7 in 0b15d14
NFCAndroid/app/src/main/java/com/qifan/nfcbank/cardEmulation/KHostApduService.kt
Lines 22 to 36 in 0b15d14
appand not on thereadnfcmessage?I also read your comment on StackOverflow: https://stackoverflow.com/questions/29122848/ndef-message-with-hce-android, but i quite haven't understood. Were you able to emulate the first authentication code message to be processed by the HCE app, so that the reader should just send the binary read message or am I getting something wrong here?
PS: If that's true, I haven't understood how you were able to skip the first authentication message to be processed by the HCE app.
albertoZurini commentedon Sep 28, 2024
I was able to get it working! Forked repo can be found here: https://github.com/albertoZurini/NFC-Demo, please send me pull requests if you found anything wrong!
kevin930321 commentedon Dec 26, 2024
@albertoZurini Could you provide the APK file? Thanks.
albertoZurini commentedon Dec 27, 2024
@kevin930321 what do you mean by APK? If you go to my repo you can check the GIF. There's not much point in sharing the APK since it is useless (only transferring a string from a phone to the other). If you want it I can share it still, would you like to share an email/Telegram/whatever I can send the APK to?
kevin930321 commentedon Dec 27, 2024
@albertoZurini Oh, I see, never mind then, thanks a lot.