本文介绍了我应该何时使用GCM设备组与主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑将Google Cloud Messaging整合到我的应用中。我想发送消息给与用户相关的所有设备。起初,它看起来像GCM的将是一条路。但是这需要在我的服务器上管理注册ID和通知密钥。似乎使用GCM的更容易,其主题是键入一些共享用户信息,如用户ID。



我打算使用GCM向Android和iOS应用发送数据。我将发送背景可用内容(使用Apple推送通知术语)消息和用户可见通知。

有什么好处,如果有的话,设备组消息传递给主题消息传递?

解决方案

我认为以下第一点是唯一有所作为的地方




$ b


I am looking into incorporating Google Cloud Messaging into my app. I would like to send messages to all devices associated with a user. At first, it looked like GCM's device group messaging would be the way to go. But that requires managing registration IDs and notification keys on my server. It seems like it'd be easier to use GCM's topic messaging where the topic is keyed on some shared user information like a user ID.

I intend to use GCM to send data to both Android and iOS apps. I will be sending both background "content available" (to use the Apple Push Notification terminology) messages and user-visible notifications.

What advantages are there, if any, of device group messaging over topic messaging?

解决方案

I think the first point below is the only thing that makes any difference

https://firebase.google.com/docs/cloud-messaging/android/topic-messaging

这篇关于我应该何时使用GCM设备组与主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-10 21:32