In an Android app, I need several listeners (for network changes, location changes, etc.).
As far as I can see, these are called in a thread (or threads) which are not my main background service thread. (I'm creating a service-only app.)
My question is:
Can my app be hit by listeners firing simultaneously, or does Android mitigate this by invoking my listeners in a single thread?
Secondly, if the listeners aren't 'sequentialised', are the individual listeners re-entrant?
In other words, can I carry out complex processing in my listeners, or should they just dump what happened into a synchronized list, for later processing my background service thread (and wakeup the background service thread from its sleep while they're at it).
There seems to be very little coverage of thread synchronisation in Android example docs and books.
Thanks,
Chris.