将数据写入新的NFC标签不工作? [英] Writing data into New NFC Tag not works?

查看:918
本文介绍了将数据写入新的NFC标签不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手,NFC的Andr​​oid应用程序开发。我与App开发完成,一切运行良好。由于我的测试的一部分,我用MifareClassic以及MifareDesfire标签写入和读取。我在NDEF格式存储数据。起初我用其他的应用程序,如恩智浦tagwriter和Tagstand Tagwriter上面的测试标签,然后我用我的应用程序使用。所以一切都工作得很好。即使后来我用我的应用程序读写索尼的Felica标签(新的标签),这也工作得很好的数据。所以,我通过应用客户进行审查,但我才知道,应用程序是不是写上新标签。如果他们是从其他应用程序重置然后正常工作。所以,我在这里做了同样的测试,发现同样的问题,因为客户端上报。可能是什么问题?已经有人遇到同样问题的种类?它是使用前需要进行格式化?如果是的话该怎么做?有人来帮助解决这一问题。

I am Newbie to NFC Android App Development. I am done with the App development and everything worked fine. As part of my testing I used MifareClassic as well MifareDesfire tags to write and read. I am storing data in Ndef format. Initially I used the above testing tags with other apps like Nxp tagwriter and Tagstand Tagwriter and then I used with My app. So everything worked fine. Even later I used my app to write and read data from Sony Felica tags(new tags) which also worked fine. So I passed app to client for review but I came to know that app is not writing on New Tags. If they are reset from other apps then It works fine. So I done the same test here and found the same issue as client reported. What might be the issue? Has someone come across same kind of issue? Is it required to format before using? if so how to do that? Someone Help to solve the issue.

先谢谢了。

推荐答案

有些标签不是由制造商格式化,但可以格式化为NDEF存储。典型的例子是MIFARE经典,超轻和的DESFire代码,而FeliCa的类型3的标签将被由生产商已格式化(并且不能由用户进行格式化)。

Some tags are not formatted by the manufacturer, but can be formatted for NDEF storage. Typical examples are MIFARE Classic, Ultralight and DESFire tags, while FeliCa Type 3 Tags will be formatted already by the manufacturer (and cannot be formatted by the user).

Android提供的类 NdefFormatable 为NDEF格式。每当一个标签不支持 NDEF 类,但支持 NdefFormatable 类,可以尝试通过格式化标签调用格式()方法。谁也不能保证这会工作,虽然。一般情况下,完全是空的标签,对从供应商,将给予最好的结果。

Android provides the class NdefFormatable for NDEF formatting. Whenever a tag does not support the Ndef class, but supports the NdefFormatable class, you can try to format the tag by calling the format() method. There is no guarantee this will work, though. In general, completely empty tags, right from the supplier, will give the best results.

这篇关于将数据写入新的NFC标签不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆