Android examples for android.content:Intent
register Local Receiver with IntentFilter
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;// w w w . jav a 2 s . c o m } LocalBroadcastManager manager = LocalBroadcastManager.getInstance(context); manager.registerReceiver(receiver, intentFilter); } }