关于Broadcast接收的问题

nulls 2011-09-02 08:48:33
我写了一个Broadcast

Intent intent = new Intent("jblend.mms.intent.action.SEND_REQUEST",
Uri.parse("content://com.jblend.android.mmsprovider/mms/5"));
sendBroadcast(intent);

这种带Uri的Broadcast应该怎么接收
只要能收到Broadcast就行
...全文
228 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
慌慌丨张张 2011-09-02
  • 打赏
  • 举报
回复
broadcastonreceiver中的onrecevice,对broadcast来说应该不考虑intent里面的都西吧,
coxfilur_2008 2011-09-02
  • 打赏
  • 举报
回复
mark.
yangpingliu 2011-09-02
  • 打赏
  • 举报
回复
使用当前BroadcastReceiver调用onReceive方法试试
mBroadcastReceiver.onReceive(context, intent);
nulls 2011-09-02
  • 打赏
  • 举报
回复
正常的收不到
儿大不由爷 2011-09-02
  • 打赏
  • 举报
回复
正常的receiver不行么
nulls 2011-09-02
  • 打赏
  • 举报
回复
注册了就是收不到啊,不带URI就可以收
妖怪 2011-09-02
  • 打赏
  • 举报
回复
自己registerIntentReceive吧
nulls 2011-09-02
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 jie8991 的回复:]
配置文件像下面这样配置试试

Java code


<intent-filter>
<action android:name="android.intent.action.STORE_REQUEST"></action>
<category android:name="android.intent.category.DEFAULT"></category>
[color=#FF0……
[/Quote]
貌似不行,有什么好的办法么
神之泪花 2011-09-02
  • 打赏
  • 举报
回复
配置文件像下面这样配置试试

<intent-filter>
<action android:name="android.intent.action.STORE_REQUEST"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<data android:scheme="http"></data>
</intent-filter>
yangpingliu 2011-09-02
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 s762888517 的回复:]

broadcastonreceiver中的onrecevice,对broadcast来说应该不考虑intent里面的都西吧,
[/Quote]
怎么不考虑,intent里面传递动作

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧