80,351
社区成员
发帖
与我相关
我的任务
分享
Intent myIntent = new Intent(Intent.ACTION_CALL);
myIntent.setFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
sendBroadcast(myIntent);
System.out.println("广播已经发送");
public class OneBroadcast extends BroadcastReceiver {
protected OneBroadcast(){
System.out.println("你好小妹");
}
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
System.out.println("你好小妹");
}
}
<receiver android:name=".OneBroadcast">
<intent-filter>
<action android:name="android.intent.action.ACTION_CALL"></action>
</intent-filter>
</receiver>