My app (targetSdk=25) has a broadcast receiver defined in the manifest as follows:
<receiver android:name="my.package.DownloadManagerReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
</intent-filter>
</receiver>
My DownloadManagerReceiver
is notified whenever Android's DownloadManager finishes downloading a file, so I can do some processing on the file that was downloaded.
I'm working on migrating my app's targetSdk to 27 (Oreo). According to https://developer.android.com/about/versions/oreo/background#broadcasts, implicit broadcast receivers registered through the manifest are not supposed to work in Android O (except for those whitelisted exceptions).
However, when I run my app using an emulator running Android 8.0 and targetSdk=27 my broadcast receiver defined in the manifest is still notified by the DownloadManager after a download completes.
I tried to find the source code where the DownloadManager sends its broadcast to understand how it sends its broadcasts but I couldn't find it.
Does anybody know whether android.intent.action.DOWNLOAD_COMPLETE
is an explicit broadcast rather than an implicit one? Any ideas why my receiver is still receiving that broadcast?