GCM: How to send heartbeat to GCM server
问题 I want to send a heartbeat from my application to the GCM server, so the connection will stay alive. How can I do that, and how can I know the URL of my GCM server?? Thanks in advance!! 回答1: How to send the heartbeat This class can sent the proper intents public class GcmKeepAlive { protected CountDownTimer timer; protected Context mContext; protected Intent gTalkHeartBeatIntent; protected Intent mcsHeartBeatIntent; public GcmKeepAlive(Context context) { mContext = context;