广播与activity的交互可以通过接口回调的方式或者handler
/*********************************************************activity**********************************************/protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); FragmentManager fm = getFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); fragment1 = new Fragment1(); ft.add(R.id.f1, fragment1); ft.commit(); mb = new MyBroadCast(); IntentFilter inf = new Inte