Is there a way to tell if LocalBroadcastManager broadcasts were received? Or are being listened to?
sendBroadcast()
returns true
if there was 1+ receivers, false
otherwise. That's not documented, but that is based on the current implementation. I filed an issue to get that documented.
Hence, your IntentService
could use sendBroadcast()
to try to send a message to your running Service
, if it exists. If it does, sendBroadcast()
should return true
, and the IntentService
knows that the message should be handled there. If sendBroadcast()
returns false
, you can raise the Notification
.