Code example for NdefMessage

Methods: getRecords

			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;
	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 
Connect your IDE to all the code out there  Get Codota for Java