How should a service communicate with an activity in real-time?
BroadcastReceivers seem too slow and unreliable. Sometimes they appear too slow or stop working entirely. As an example, there was a delay of a few minutes between sending and receiving broadcasts with one of my test applications.
I can't get traditional callbacks to work reliably. I am pretty sure you're not supposed to.
There's an option to bind a service. Is that suitable for real-time communication?
I intend to send small integer updates roughly 20 (edited) times a second.
Am I looking in the right direction?
To narrow the scope of this question:
My application is an audio MediaPlayer. I need the service to host the MediaPlayer. I would like the MediaPlayer service to send updates to my GUI which mainly consist of the current position of the audio being played.
My question is - are bound services suitable for this task? If not, what alternatives are there?