Android examples for Intent:Broadcast
register Local Intent Receiver
//package com.java2s; import android.content.BroadcastReceiver; import android.content.Context; import android.content.IntentFilter; import android.support.v4.content.LocalBroadcastManager; public class Main { public static void registerLocalReceiver(Context context, BroadcastReceiver receiver, IntentFilter intentFilter) { if (context == null) { return; }//from ww w . j a v a 2s . c o m LocalBroadcastManager manager = LocalBroadcastManager .getInstance(context); manager.registerReceiver(receiver, intentFilter); } }