How to keep client connected

Does anyone know how to keep my client connect in Android even when the app is killed.

I tried to do this using services, but i afraid i doing something wrong.