Search code examples
androidbroadcastreceiver

Maximum acceptable frequency of sending broadcast in Android


What is maximum acceptable frequency from your point of view or experience of sending broadcasts in Android to be received by BroadcastReceivers without performance impact?

Let's say we send only basic data in a Bundle without need for long deserialization. I am going to send broadcasts only inside my app with LocalBroadcastManager.

In other words this question is about when you should stop using broadcasters and write you own implementation for faster usage and when you should not do it.


Solution

  • First of all, if you send data inside one app, I would advise you, instead of BroadcastReceiver use LocalBroadcastManager or even not use any type of broadcast receivers at all - just Observer Pattern (here good article on this topic).