摘要:
在Activity中,注册广播的一个Demo。总共分3步第一步:定义一个BroadcastReceiver广播接收类:[java]view plaincopyprivateBroadcastReceivermBroadcastReceiver=newBroadcastReceiver(){@OverridepublicvoidonReceive(Contextcontext,Intentintent){Stringaction=intent.getAction();if(action.equals(ACTION_NAME)){Toast.makeText(Test.this,"处理a 阅读全文