What is the use of getAbortBroadcast in Broadcast Receiver?


Official Docs Says:

Returns the flag indicating whether or not this receiver should abort the current broadcast.

So, in what conditions it returns true to indicate that the broadcast should be aborted?


It seems to return true if you had previously called abortBroadcast() within your onReceive() method. This is based on a quick glance at the Android 9.0 source code to BroadcastReceiver.


Got it thanks…:grinning::grinning: