如何读取和写入Android的NFC标签? [英] How to read and write Android NFC tags?
问题描述
我是新手到Android,但我需要使用Android的NFC为我最后一年的项目。我也跟着一些教程使用ADAM摇杆源$ C $ C我NFCTest从这样的:
I am a newbie to android but i need to make use of android nfc for my final year project. i followed some tutorial using the adam rocker source code for my NFCTest from this:
<一个href="http://$c$c.google.com/p/adamrocker/source/browse/trunk/NFCTest/src/com/adamrocker/android/mynfc/MyNFCActivity.java?spec=svn16&r=16">NFCTest
请我可以得到任何人协助我做这个源$ C $ C能够读取和写入NFC标签,并启动应用程序
please can i get anyone to assist me in making this source code be able to read and write nfc tags and also launch an application
谢谢anticpation
Thanks in anticpation
推荐答案
在 NDEF工具为Android 公用事业项目可以帮助做以下
The NDEF Tools for Android utility project helps doing the following
- <一个href="http://$c$c.google.com/p/ndef-tools-for-android/source/browse/ndeftools-util/src/org/ndeftools/util/activity/NfcDetectorActivity.java">Detect,那么
- <一个href="http://$c$c.google.com/p/ndef-tools-for-android/source/browse/ndeftools-util/src/org/ndeftools/util/activity/NfcReaderActivity.java">Read或<一href="http://$c$c.google.com/p/ndef-tools-for-android/source/browse/ndeftools-util/src/org/ndeftools/util/activity/NfcTagWriterActivity.java">write,或
- <一个href="http://$c$c.google.com/p/ndef-tools-for-android/source/browse/ndeftools-util/src/org/ndeftools/util/activity/NfcBeamWriterActivity.java">Beam (推)NFC内容
- Detect, then
- Read or write, or
- Beam (push) NFC content
该项目还包括数据绑定所有的标准化NDEF记录类型,从而真正简化了的事情相比,与包含在Android SDK中的(字节数组为主)NDEF类工作; - )
The project also includes data bindings for all standardized NDEF record types, which really simplifies things compared to working with the (byte-array-based) NDEF classes included in the Android SDK ;-)
另请参阅 NFC Eclipse插件的图形NDEF编辑器 - 带有一个工具应用其读取和写入标签和横梁,还具有NFC读写器集成: - )
Also see the NFC Eclipse plugin for a graphical NDEF editor - comes with an utility app which reads and writes to tags and beams, also has NFC reader integration :-)
顺便问一下,你正在寻找Android应用程序记录为启动应用程序。该发射功能不需要任何真正落实;它内置的Android> = 4.0,所以把该记录上的标记是不够的。
By the way, you are looking for the Android Application Record for launching the app. The launching 'feature' does not require any real implementation; it is built into Android >= 4.0, so putting that record on a tag is enough.
编辑:更新链接
这篇关于如何读取和写入Android的NFC标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!