Code example for NdefMessage

Methods: getRecords

0
	} 
	 
	protected NfcMessage(Parcel in){
		byte bytes[] = in.createByteArray();
		try { 
			mMessage = new NdefMessage(bytes);
		} catch (FormatException e) {
			e.printStackTrace();
		} 
		NdefRecord[] records = mMessage.getRecords();
		mId = new String(records[records.length-1].getId());
	} 
	 
	protected NfcMessage(NdefMessage msg){
		mMessage = msg;
		mId = new String(mMessage.getRecords()[0].getId());
	} 
	 
	 
	/** 
	 * Adds a String-record to the message.