List of usage examples for android.nfc NdefRecord getId
public byte[] getId()
From source file:Main.java
static JSONObject recordToJSON(NdefRecord record) { JSONObject json = new JSONObject(); try {/* w ww. ja v a 2 s. c om*/ json.put("tnf", record.getTnf()); json.put("type", byteArrayToJSON(record.getType())); json.put("id", byteArrayToJSON(record.getId())); json.put("payload", byteArrayToJSON(record.getPayload())); } catch (JSONException e) { //Not sure why this would happen, documentation is unclear. Log.e(TAG, "Failed to convert ndef record into json: " + record.toString(), e); } return json; }