2013-03-28 21 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); 
     } 
    } 
相關問題