当前位置: 代码迷 >> 综合 >> 安卓 有序广播笔记
  详细解决方案

安卓 有序广播笔记

热度:67   发布时间:2024-01-22 04:16:36.0
/**
* 七点开始新闻联播
* @param view

*/


public void sendMashroom(View view){
Intent intent = new Intent();
intent.setAction("com.itheima.gov.SENDMASHROOM");
//发送有序广播
//intent 意图
//receiverPermission 权限 默认null
//resultReceiver 结果接受者 null
//消息处理器 null 默认
// Bundle  null额外的数据  可传递map对象
  sendOrderedBroadcast(intent, null, new MyReceiver(), null, 1, "七点开始新闻联播", null);
sendBroadcast(intent);
}
  相关解决方案