What is the use of getAbortBroadcast in Broadcast Receiver?

from the CommonsWare Community archives

At September 1, 2018, 4:46pm, hackzcorporation asked:

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?


At September 1, 2018, 5:04pm, mmurphy replied:

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.


At September 1, 2018, 5:11pm, hackzcorporation replied:

Got it thanks…:grinning::grinning: