package com.example.kanbandatatracker;

import android.nfc.NdefMessage;
import android.nfc.NdefRecord;
import android.nfc.NfcAdapter;
import android.os.Bundle;
import android.os.Parcelable;
import android.app.Activity;
import android.view.Menu;
import android.widget.TextView;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public void onResume() {
		super.onResume();
		if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {
	        Parcelable[] rawMsgs = getIntent().getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);
	        if (rawMsgs != null) {
	            NdefMessage[] msgs = new NdefMessage[rawMsgs.length];
	            for (int i = 0; i < rawMsgs.length; i++) {
	                msgs[i] = (NdefMessage) rawMsgs[i];
	                final TextView helloWorldText = (TextView) findViewById(R.id.hello_world);
	                helloWorldText.setText(msgs[i].toString());
	            }
	        }
	    }
	}

}

@@ -33,16 +33,50 @@
 acker;%0A%0A
+import java.nio.charset.Charset;%0A%0A
 import a
@@ -1143,16 +1143,17 @@
 sgs%5Bi%5D;%0A
+%0A
 %09       
@@ -1161,16 +1161,271 @@
         
+NdefRecord%5B%5D records = msgs%5Bi%5D.getRecords();%0A%09                for (NdefRecord record : records) %7B%0A%09                %09byte%5B%5D payload = record.getPayload();%0A%09                %09String text = new String(payload, Charset.forName(%22US-ASCII%22));%0A%0A%09                %09
 final Te
@@ -1491,16 +1491,17 @@
 world);%0A
+%09
 %09       
@@ -1536,28 +1536,33 @@
 ext(
-msgs%5Bi%5D.toString());
+text);%0A%09                %7D
 %0A%09  

Can actually decode the payload