我在单个接收器类中有两个意图操作。在清单文件中:
<receiver android:name=".ConnectivityReceiver" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"></action>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
在接收器类里面onReceive()
:
@Override
public void onReceive(Context context, Intent intent) {
System.out.println("--------BOOT-----------"+intent.getAction());
}
此处intent.getAction()
仅返回“android.net.conn.CONNECTIVITY_CHANGE”,但我无法跟踪“启动完成”操作。反正有没有从一个 common 获得多个意图操作onReceive()
?