Can't exchange data between Android phone and Arduino with NFC module, using HCE

扶醉桌前 提交于 2019-12-04 20:23:06
Nur4I

I finally got it working. First of all want to say that the problem arose because of my incompetence in Android programming (I'm totally newbie).

  1. responseLength must be set manually, and ideally, must be equal to response buffer size (thanks to Traveller99 from arduino forum)

  2. HCE will not work if the screen is off (here is the fun part :) )

    Current Android implementations turn the NFC controller and the application processor off completely when the screen of the device is turned off. HCE services will therefore not work when the screen is off. HCE services can function from the lock-screen however.

Thanks to Michael for trying to help!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!