Finally I solved the problem this way:
Make a public Service(android:export="true") to set up TCP connection to the server, when the APP starts, first check if the public Service exists, if not, call startService(). Then call bindService() in the APP. To communication with the public Service, use a Messenger class:
http://developer.android.com/guide/components/bound-services.html#Messenger