broadcast的intent不能启动一个activity
2011-04-15 13:56
411 查看
Note that, although the Intent class is used for sending and receiving
these broadcasts, the Intent broadcast mechanism here is completely separate
from Intents that are used to start Activities with
There is no way for a BroadcastReceiver
to see or capture Intents used with startActivity(); likewise, when
you broadcast an Intent, you will never find or start an Activity.
These two operations are semantically very different: starting an
Activity with an Intent is a foreground operation that modifies what the
user is currently interacting with; broadcasting an Intent is a background
operation that the user is not normally aware of.
these broadcasts, the Intent broadcast mechanism here is completely separate
from Intents that are used to start Activities with
Context.startActivity().
There is no way for a BroadcastReceiver
to see or capture Intents used with startActivity(); likewise, when
you broadcast an Intent, you will never find or start an Activity.
These two operations are semantically very different: starting an
Activity with an Intent is a foreground operation that modifies what the
user is currently interacting with; broadcasting an Intent is a background
operation that the user is not normally aware of.
相关文章推荐
- android中,如何用intent去启动另外一个activity
- 方式SingleTask 启动Intent设置 不能如愿打开需要的Activity
- Intent启动一个Activity
- 使用Intent启动一个Activity,再返回到之前的Activity
- 在BroadcastReceiver中启动Activity,需为Intent添加Flag:Intent.FLAG_ACTIVITY_NEW_TASK
- Android关于Intent的思考:如何更好的启动一个Activity
- 利用Intent启动另外一个Activity的方法
- android之隐示意图--在一个 <intent-filter>意图中用两个category启动这个activity
- android之隐示意图--在一个 <intent-filter>意图中用两个action启动这个activity
- android之隐示意图--在一个 <intent-filter>意图中用两个category启动这个activity
- 从Service中启动一个Activity需要加Intent.FLAG_ACTIVITY_NEW_TASK
- android之隐示意图--在一个 <intent-filter>意图中用两个action启动这个activity
- android之隐示意图--在一个 <intent-filter>意图中用两个category启动这个activity
- intent 不能从一个activity跳转到一个Fragment
- android之隐示意图--在一个 <intent-filter>意图中用两个action启动这个activity
- 隐式Intent启动Activity,action不能使用@string配置
- Intent系列1——启动另外一个Activity
- 使用intent由一个Activity启动另外一个Activity
- 隐式Intent启动Activity,action不能使用@string配置
- 安卓隐式Intent启动Activity和BroadcastReceiver若干注意点