Android NFC start app (using AAR) and read text

南楼画角 提交于 2019-12-08 07:49:04

问题


I have NFC tag with plain text and AAR. When I tap an NFC to the phone, my app will start. But It just call onCreate() method and don't read the plain text. I have to tap again and then app will read the text.

Can I somehow start app when I tap an NFC and at the sametime read the text?

I use this manual for implement NFC function.


回答1:


To make sure that you also receive the NDEF message, make sure that you have added an Intent filter for the type of message that is on the tag.



来源:https://stackoverflow.com/questions/20082064/android-nfc-start-app-using-aar-and-read-text

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