NFC的Andr​​oid应用程序启动(使用AAR)和阅读文本应用程序、文本、Andr、NFC

2023-09-12 05:18:13 作者:薄荷少年衬衣情.

我有纯文本和AAR NFC标签。当我点击一个NFC的手机,我的应用程序将启动。但它只是叫的onCreate()方法和不读的纯文本。我不得不再次点击,然后应用程序将读取的文本。

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.

我可以以某种方式启动的应用程序,当我点击一个NFC和在Sametime读课文?

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

我用这个手动以实现NFC功能。

I use this manual for implement NFC function.

推荐答案

要确保你还会收到NDEF消息,请确保您所添加的意图过滤器的消息是标签上的类型。

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.