我需要在我的一个应用程序中实现推送通知功能。我浏览了 android 文档 GCM Advance 主题 here .
在第二段即
“在最好的情况下,如果设备连接到 GCM,屏幕打开,并且没有节流限制(请参阅节流),消息将立即传递。”
这里“如果设备连接到 GCM”是什么意思?这是与互联网连接有关的事情吗?
请分享您对此的看法,以便更好地理解。
谢谢。
最佳答案
是的,它与互联网连接有关。
Google Cloud Messaging for Android (GCM) is a service that allows you to send data from your server to your users' Android-powered device. This could be a lightweight message telling your app there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly).
更多here .基本上上面这句话的意思是它需要互联网连接。如果您进一步访问 GCM 相关链接,您将找到具有互联网权限的权限列表。
关于android - "if the device is connected to GCM"是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14577853/