Inspectopedia Help

Missing registerReceiver() exported flag

Missing registerReceiver() exported flag

A future platform release will require all receivers registering for non-system broadcasts to include a flag indicating the receiver's exported state. Apps registering for non-system broadcasts should use the ContextCompat#registerReceiver APIs with flags set to either RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED.

If you are not expecting broadcasts from other apps on the device, register your receiver with RECEIVER_NOT_EXPORTED to protect your receiver on all platform releases.

Issue id: UnspecifiedRegisterReceiverFlag,android.content.BroadcastReceiver,android.content.IntentFilter,int)

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3


Android, 2022.3.1 Beta 2

Last modified: 13 July 2023