Java tutorial
//package com.java2s; import java.io.Serializable; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.support.v4.content.LocalBroadcastManager; public class Main { public static void sendBroadcase(String name, Activity activity) { Intent intent = new Intent(name); LocalBroadcastManager.getInstance(activity).sendBroadcast(intent); } public static void sendBroadcase(String name, Context activity, String content) { Intent intent = new Intent(name); intent.putExtra("content", content); LocalBroadcastManager.getInstance(activity).sendBroadcast(intent); } public static void sendBroadcase(String name, Context activity, Serializable content) { Intent intent = new Intent(name); intent.putExtra("content", content); LocalBroadcastManager.getInstance(activity).sendBroadcast(intent); } }