如何使用iPhone应用程序从我的NFC标签中提取UID并在DB查询的代码中重复使用
对于我的项目,我想做一个基于NFC标签的构建分类法。我想使用内置的iPhone/Android应用程序(不是应用商店应用程序)扫描NFC标签,以打开浏览器中NFC标签上存储的URL。 到目前为止,一切都很好。这是 现在,我需要NFC标签的UID能够在数据库(PostgreSQL)中调用相应信息。该信息应显示在Web应用程序中。
问题: 如何将与URL的UID从NFC标签平行于我的程序中启动数据库查询?
非常感谢您的想法。
For my project, I would like to do an NFC tag based build taxonomy. I would like to scan the NFC tag with the built-in iPhone/Android application (not an app store app) to open the URL stored on the NFC tag in the browser.
So far so good. This is
Now I need the UID of an NFC tag to be able to call the corresponding information in my database (PostgreSQL). The information should be displayed in the web app.
The Question:
How do I get the UID parallel to the URL from the NFC tag into my program to start the database query?
Thanks a lot for your ideas.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我猜您是在标签上以NDEF格式存储URL并依赖系统启动URL?
有一些选项: -
编写自己的应用程序以读取URL和UID,然后用URL和UID作为参数
启动浏览器
使用具有允许动态数据的特殊功能的NFC标签启动浏览器。例如,NTAG 21x系列标签允许将UID镜像到数据部分,因此可以生成一个NDEF URL,该NDEF URL包含UID作为参数,然后系统应用将启动正确的URL。
这仅在Android上起作用,并且仅与Chrome一起使用 - 该标签启动URL,网页使用Web NFC用于网页读取标签UID。
I guess you are storing the URL in Ndef format on the Tag and relying of the system to launch the URL?
There are some options:-
Write your own app to read the URL and UID and then launch a browser with the URL and UID as parameters
Use a NFC Tag that has special features that allow dynamic data. e.g. The Ntag 21x series of Tags allow the UID to be mirrored in to the data section and thus can generate a NDef URL that contains the UID as a parameter and then the system apps will launch the right URL.
This only works on Android and only with Chrome - The Tag launches the URL and the web page uses Web NFC for the web page to read the Tag UID.
另外,安德鲁的建议您可以将UID添加到URL中作为参数。这意味着,当您编程标签时,您必须先读取UID,将其组合到URL中,然后将其存储在标签中。
In addition Andrew's suggestions you may add the UID to the URL as a parameter. This means that when you program the tags, you have to read the UID first, combine that into the URL and store that in the tag.