I have an application that uses sockets to connect to my server. A lot of times the application lies \"dormant\" when it doesn\'t need to send info back and forth to the server
Are you using a Service to handle this Socket connection to your server (it would probably be a good idea). If/when you are, you can create the "ping" method as a thread in your service.