2013-03-28 24 views
0

我已经经历了关于标签写入堆栈溢出的各种讨论。但是没有找到任何可以帮助我使用Android NFC功能编写功能的代码。标签写在Android实际运行的例子或代码

我想在Android Jelly Bean上构建标签写入功能。 但无法在标签上书写。

任何人都可以帮我提供一些示例代码或示例吗?

感谢您的分享。

+0

有许多不同类型的标签,适用于不同的应用。你想写什么样的标签或什么样的数据? –

回答

0

这就是我做的编写使用NFC的实用工具类为Android,我发表here标签:

@Override 
    protected void onNewIntent(Intent intent) { 
     // Tag writing mode 
     if (writeMode && nfcUtil.checkTagIntentMatch(intent)) { 
      Tag detectedTag = nfcUtil.getTag(intent); 
      try { 
       Util.playSound(this); 
      } catch (Exception e) { } 
      nfcUtil.writeTag(movie.asNdef(), detectedTag); 
     } 
    } 
相关问题