简体   繁体   English

GCM和App引擎用于推送通知

[英]GCM and App engine for push notifications

I was wondering if using GCM and app engine would be the best option for my problem. 我想知道使用GCM和应用程序引擎是否是解决我的问题的最佳选择。 It definitely doesn't seem trivial. 绝对看起来并不琐碎。

I have a list of shows and users on the android app can subscribe to multiple shows. 我有表演列表,Android应用程序上的用户可以订阅多个表演。 each show can have multiple times. 每个节目可以有多次。 I would like to send a notification to the user for the shows he/she is subscribed to. 我想向用户发送有关他/她已订阅的节目的通知。

now i can use gcm and register every instance of the app. 现在我可以使用gcm并注册该应用程序的每个实例。 and then use appengine somehow to constantly run a background service that looks for who it should notify and then push a notification ? 然后以某种方式使用appengine来不断运行后台服务,该后台服务寻找应通知的人,然后推送通知? Is this the only option or is there a better way to do this ? 这是唯一的选择还是有更好的方法呢?

There is a better option too, you may use Google topic messaging . 还有一个更好的选择,您可以使用Google主题消息

You have to subscribe your users to your desired topic, eg show-1 on the android app, then send a push notification to that topic to: \\topics\\show-1 (instead of a list of reg-ids). 您必须为用户订阅所需的主题,例如android应用程序上的show-1 ,然后向该主题发送推送通知to: \\topics\\show-1 (而不是reg-id列表)。

Then all of the users which had been subscribed to that topic will get the notification. 然后,所有已订阅该主题的用户都将收到通知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM