I have encountered the same problem with an app I developed. It had a foreground application and a background service that did some monitoring work. I had to keep the background monitoring service alive as much as possible so it can do its job. It didn't matter if the service was temporarily killed as long as it restarted soon (similar to your case where it doesn't really matter if the background chat client stops for a few seconds as long as it restarts and reconnects).
What I did to solve the problem was a combination of things:
1. Raise the priority of service so Android will try not to kill it
2. Make Android restart the service when it is killed
3. Make Android start service on startup
That way the service started automatically, was rarely killed, and when it died it was started again and resumed its work.
Do you have a background chat service? If so it's not a big deal and I can do that in 1 day for even less than my bid. If not, I can create such a service and keep it alive the way I described.