我正在检查一些关于如何在DownloadManager完成下载时通知接收器的教程,他们像这样注册接收器
context.registerReceiver(onComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
虽然,我想在我的manifest.xml
注册接收器而不是实用,我发现人们正在这样做
<receiver
android:name=".DownloadReceiver"
android:exported="true"
android:icon="@drawable/download_icon" >
<intent-filter>
<action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
</intent-filter>
</receiver>
那么 android.intent.action.DOWNLOAD_COMPLETED 和 DownloadManager.ACTION_DOWNLOAD_COMPLETE 之间有什么不同?为什么他们不在清单中使用<action android:name="DownloadManager.ACTION_DOWNLOAD_COMPLETE" />
?