我正在尝试解决与启动相关的问题,我注意到 AndroidManifest.xml 的许多示例都有 android.intent.action.BOOT_COMPLETED 和一些也有 android.intent.category.HOME 类别的示例。有谁知道两者之间的区别(如果有的话)是什么?
IE。
<receiver android:name=".MartiniBootBroadCastReciever"
android:enabled="true" android:exported="false"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
相对
<receiver android:name=".MartiniBootBroadCastReciever"
android:enabled="true" android:exported="false"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>