简体   繁体   English

在Rails 3中向移动应用程序推送通知

[英]Push notifications to mobile applications in Rails 3

I am working on a project in Ruby 1.9.3 and Rails 3 and I am looking for a gem to send push notifications to my iOS app and to my Android app. 我正在研究Ruby 1.9.3和Rails 3中的一个项目,我正在寻找一个gem来向我的iOS应用程序和我的Android应用程序发送推送通知。
I found speedy_c2dm for android worth useful. 我发现speedy_c2dm对于android非常有用。 But,I am concerned about as mentioned in Migration to GCM : 但是,我担心迁移到GCM时会提到:

Android Cloud to Device Messaging (C2DM) is deprecated. 不推荐使用Android Cloud to Device Messaging(C2DM)。 C2DM developers are strongly encouraged to move to Google Cloud Messaging (GCM) 强烈建议C2DM开发人员迁移到Google云消息传递(GCM)

Does speedy_c2dm support GCM ? speedy_c2dm是否支持GCM Is there any other gem that supports new GCM ? 还有其他支持新GCM的宝石吗? Also, I want to know what is difference between speedy_c2dm and c2dm ? 另外,我想知道speedy_c2dmc2dm有什么区别?

Both speedy_c2dm and c2dm are just two libraries to send push notifications by using C2DM, they are written by different persons, they both work and there are not major differences, in theory speedy_c2dm should be faster, but there are not benchmarks at the moment. speedy_c2dm和c2dm都只是两个通过C2DM发送推送通知的库,它们是由不同的人编写的,它们都工作且没有重大差异,理论上speedy_c2dm应该更快,但目前还没有基准。

Instead of implementing C2DM, you should implement GCM :) 不应该实现C2DM,而应该实现GCM :)

There are many gcm gems, the most popular is gcm but last commit was 5 months ago: 有很多gcm宝石,最受欢迎的是gcm,但最后一次提交是5个月前:

gcm GCM

gcm_on_rails gcm_on_rails

pushgcm pushgcm

simple_gcm simple_gcm

simple-gcm 简单-GCM

higcm higcm

speedygcm speedygcm

我刚刚发布了支持APN和GCM的新版本的rapns: https//github.com/ileitch/rapns

Google "Cloud To Device Messaging" (c2dm) is called now "Google Cloud Messaging" (GCM). 谷歌“云到设备消息”(c2dm)现在称为“谷歌云消息传递”(GCM)。 The old c2dm_on_rails gem has been replaced by a gcm_on_rails gem, and the speedy_c2dm gem has been replaced by the speedy_gcm gem. c2dm_on_rails宝石已被换成了gcm_on_rails宝石,和speedy_c2dm创业板已被更换speedy_gcm宝石。 gcm_on_rails is similar to the popular apn_on_rails for Apple Push Notifications. gcm_on_rails类似于Apple推送通知的流行apn_on_rails Speedyc2dm and gcm_on_rails are both wrappers used to access the GCM API . Speedyc2dm和gcm_on_rails都是用于访问GCM API的包装器。

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

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