简体   繁体   English

GCM和PARSE推送消息之间的区别

[英]The difference between GCM and PARSE push messages

I am buiding an android app which will be receiving notifications from my server. 我正在建立一个Android应用程序,它将从我的服务器接收通知。 This means all my users which is above 1 million, will receive notifications from my server. 这意味着超过100万的所有用户都将收到来自我服务器的通知。 I know parse and google cloud messaging(GCM) can do the push messages but please I want to know the best out of this two (parse and GCM) so I can implement it. 我知道解析和谷歌云消息传递(GCM)可以做推送消息,但我想知道这两个中最好的(解析和GCM),所以我可以实现它。 Thanks in advance. 提前致谢。

If you look at https://parse.com/tutorials/android-push-notifications you can see: 如果你看一下https://parse.com/tutorials/android-push-notifications,你会看到:

The Parse library provides push notifications by using Google Cloud Messaging (GCM).

So you have to register your app to GCM console to send push notification in anyway. 因此,您必须将应用程序注册到GCM控制台以发送推送通知。

When to NOT use parse.com? 什么时候不使用parse.com?

If you already have a backend service, you can easily implement push notification since there are plenty of third part libraries for different platforms such as node.js, php etc. 如果您已经拥有后端服务,则可以轻松实现推送通知,因为有很多用于不同平台的第三方库,如node.js,php等。

When to use parse.com? 什么时候使用parse.com?

If you don't have backend-service and you just want to send push notifications also if you don't want to spend your time by setting up server stuff then you can go with parse.com 如果您没有后端服务而且您只想发送推送通知,如果您不想通过设置服务器内容来花时间,那么您可以使用parse.com

NOTE: Facebook shuts down parse by January 2017 so please consider it.( http://blog.parse.com/announcements/moving-on/ ) 注意: Facebook在2017年1月之前关闭解析,所以请考虑一下。( http://blog.parse.com/announcements/moving-on/

Android push notification is a service used to send messages directly to the Android Mobile Devices. Android push notification是一种用于将消息直接发送到Android移动设备的服务。

There are several ways we can implement Android push notification. 我们可以通过多种方式实施Android推送通知。

  1. Google Cloud Messaging(GCM) Google云消息传递(GCM)

  2. Parse Notification(Parse.com) 解析通知(Parse.com)

You are asking which one is the best way to implement : 您在问哪一种是最好的实施方式:

The standard way is using GCM (Google Cloud Messaging) but there are some alternatives like Parse Notification,Which is easier to use. 标准方法是使用GCM(谷歌云消息传递),但有一些替代方案,如分析通知,这更容易使用。

If you need to handle Json Push messages,Refer this link 如果您需要处理Json Push消息,请参阅此链接

Steps involved in send Push notifications: 发送推送通知涉及的步骤:

Developing the application involves two parts: 开发应用程序涉及two部分:

GCM Server Application – Create Web application using Php to send message to User via GCM Cloud server GCM服务器应用程序 - 使用Php创建Web应用程序,以通过GCM云服务器向用户发送消息

GCM Client Application – Create Android application which receive message sent from GCM Server Web App GCM客户端应用程序 - 创建接收从GCM Server Web App发送的消息的Android应用程序

For More Informations regarding to GCM server and Client Application 有关GCM服务器和客户端应用程序的更多信息

Parse使用GCM并为Kindle使用自己的服务

Please Go with google cloud messaging(GCM) .It is very easy to integrate in android app. 请使用谷歌云消息(GCM)。它很容易在Android应用程序中集成。 the problem with parse in some case device token or registration id is not register at their database so User of parse does not get push notification.In case of GCM we can sure for device token 在某些情况下解析问题设备令牌或注册ID不会在他们的数据库中注册,因此解析用户不会获得推送通知。如果是GCM,我们可以确定设备令牌

So my recommendation is GCM Hope this will help you. 所以我的建议是GCM希望这会对你有所帮助。

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

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