什么是GCM? Google Cloud Messaging (GCM) 是Google提供的一个服务,用来从服务端向安卓设备发送推送通知. GCM分为客户端和服务端开发. 这里我们只介绍服务端开发.其实过程非常简单,只需利用PHP发送POST数据. 有两个关键地方需要获得一个是API Key 一个是Device ID 这个可以从安卓客户端开发者获得. class GCM { public $api_key = "AIzaSyAU3wZs9raik-mHQ"; function __…
应该是目前为止全网最详细的GCM推送解析. GCM官方解释: https://developers.google.cn/cloud-messaging/?hl=zh-cn Send data from your server to your users' devices, and receive messages from devices on the same connection. The GCM service handles all aspects of queueing of mess…