What is the use of getAbortBroadcast in Broadcast Receiver?


#1

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?


#2

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.


#4

Got it thanks…:grinning::grinning: