I have:
One bindable service setup to hand out android.os.Messenger's.
Two Fragment inside one activity bind to the service and receive their Messengers.
Both Fragments are active at the same time as they are part of a ViewPager.
When dispatching a message to both Fragments at the same time, The app crashes because of ANR
code that sends the message: (from this example)
public void sendMessageToUI(Message msg) {
for (int i = mClients.size() - 1; i >= 0; i--) {
try {
msg.replyTo = mMessenger;
Messenger client = mClients.get(i);
client.send(msg);
} catch (RemoteException e) {
mClients.remove(i);
}
}
}
More info
After extensive testing I've concluded that the messenging system works when targeting just the first, or second fragment, but crashes when targeting both.