Android NFC 教程(API 演示除外)
我正在使用我的 Nexus S 和一些 MiFare 标签,并尝试组合一个仅读取和显示标签 ID 的应用程序。我已经浏览了几次 API 演示,但不太了解它;我认为之所以如此,是因为该演示包含为无法访问真实设备的开发人员伪造标签的代码。
我需要的是关于如何为 Android 编写基于 NFC 的应用程序的教程或类似内容,理想情况下只是所需的导入以及从扫描标签返回数据的方法。
有谁知道这一点吗?
I'm tooling around with my Nexus S and some MiFare tags and am trying to get together an application that simply reads and displays the ID of a tag. I've looked through the API demo a few times and can't quite get my head around it; I think this is so because the demo includes code for faking tags for developers who don't have access to a real device.
What I need is a tutorial or similar on how to code NFC-based apps for Android, ideally just the required imports and the method that will return the data from a scanned tag.
Does anyone know this off the top of their head?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正是为了这个..我做了一些工作。
http://mifareclassicdetectiononandroid.blogspot.com/2011 /04/reading-mifare-classic-1k-from-android.html
希望有帮助。
Exactly for this.. I did some work.
http://mifareclassicdetectiononandroid.blogspot.com/2011/04/reading-mifare-classic-1k-from-android.html
Hope it helps.
我在这里为有兴趣学习如何将 NFC 与 Android 应用程序集成的人们编写了一篇关于如何开始使用 NFC 的深入教程:
http://www.jessechen.net/blog/how-to-nfc-on-the-android-platform/
I wrote an in-depth tutorial on how to get started with NFC here for people who are interested in learning how to integrate NFC with their Android app:
http://www.jessechen.net/blog/how-to-nfc-on-the-android-platform/
以下是一些针对入门级开发人员的资源:
(无耻插件;-))
许多教程的错误在于它们以低级方式处理 NDEF 消息。而是寻求更高级别的库,例如适用于 Android 的 NDEF 工具 而不是搞乱字节数组。
Here is some resources aimed at entry-level developers:
(shameless plug ;-))
What many tutorials get wrong is that they handle NDEF messages in a low-level way. Rather go for a higher-level library like NDEF Tools for Android than messing around with byte arrays.