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 
Stop searching for code, let great code find you!  Add Codota to your java IDE