I have following issue when using IPC:
My activity binds to the service. When my activity is bound to service (very similar to http://www.survivingwithandroid.com/2014/01/android-bound-service-ipc-with-messenger-2.html ) i am facing the following issue:
· Normally everything works well and messages work fine in the two directions · However after some kills of the activity all messages going from the service to the activity are being corrupted (msg.what becomes 0 and any data bundle attached in the message is lost) · The number of kills to reproduce the issue depends on used phone, on a feature phone like samsung galaxy Ace it seems easier to reproduce than in a newer phone.
Restarting the service and binding again the activity fixes completely the issue but why is caused? And how we can avoid entering this state?