Never use an implicit Intent
when an explicit Intent
will do. Android O helps enforce this by banning the receipt of implicit Intent
broadcasts from manifest-registered receivers.
Step #1: Remove the <intent-filter>
from your <receiver>
(which also means that you could get rid of android:exported="false"
, as that is now the default value)
Step #2: Replace new Intent("CANCEL_DOWNLOAD").putExtra("id", id)
with new Intent(context, NotificationReceiver.class).putExtra("id", id)