BroadcastReceiver too slow?

this is what i got so far:

Start a service that maintains two connections (to two different servers) by registering BroadcastReceiver

. BroadcastReceiver

receives my commands that I want to send over sockets. We are still working. But: if I send "more" commands in a short period of time (for example, several commands in 1 second), I BroadcastReceiver

do not receive them - is the broadcast receiver too slow? Would it help to start another thread in onReceive to handle additional data? Or do I need to go back to binding the service and passing direct commands to that object?

Is it possible? → The service runs in the background, registering BroadcastReceiver

, but also tied to an activity - it still has to be the same service "object", right?

Thank you for your help.

+3


source to share


1 answer


I'm not 100% sure, but instead of registering the broadcast receiver in the service code, it might be worth registering it in the Android Manifest, that might make it a little faster. This is how I usually do it and never find the stream to be slow or not received.



0


source







All Articles