Java tutorial
//package com.java2s; import android.os.Bundle; import android.os.Message; import android.os.Parcelable; public class Main { public static final String ARG_PARCELABLE = "ARG_PARCELABLE"; public static Message createMessage(int What, Parcelable parcelable) { Message message = new Message(); message.what = What; Bundle data = new Bundle(); data.putParcelable(ARG_PARCELABLE, parcelable); message.setData(data); return message; } }