Code example for NdefMessage

Methods: getRecords

0
			byteMessage = serializeObject(shoppingList);
		} catch (IOException e) {
			Log.e(TAG, "Error: could not serialize ShoppingList properly; " + e.getMessage());
			byteMessage = new byte[1];
		} 
        NdefMessage msg = new NdefMessage(NdefRecord.createMime(
        		"application/cmu.costco.simplifiedcheckout.nfc", byteMessage)
//        		,NdefRecord.createApplicationRecord("cmu.costco.simplifiedcheckout.nfc") 
        ); 
        Log.i(TAG, msg.getRecords()[0].toString());
        return msg;
	} 
 
	@Override 
	public void onNdefPushComplete(NfcEvent event) {
		// A handler is needed to send messages to the activity when this 
        // callback occurs, because it happens from a binder thread 
        mHandler.obtainMessage(MESSAGE_SENT).sendToTarget();
	} 
	 
	/** This handler receives a message from onNdefPushComplete */