Android Action静态广播收不到(系统版本8.0)
Intent intent = new Intent();
intent.putExtra("Object",object );
intent.setAction("xxx");
intent.setComponent(new ComponentName(this,
"广播类全路径"));
sendBroadcast(intent);
本文介绍在Android系统版本8.0中如何正确发送静态广播的方法,包括设置广播接收者组件的具体路径,通过Intent发送带有额外对象数据的广播。
Intent intent = new Intent();
intent.putExtra("Object",object );
intent.setAction("xxx");
intent.setComponent(new ComponentName(this,
"广播类全路径"));
sendBroadcast(intent);
2577

被折叠的 条评论
为什么被折叠?