简体   繁体   English

具有Android Java中的Google Cloud Messaging的Firebase

[英]Firebase with Google Cloud Messaging in Android Java

Is there any possibility to implement GCM with Firebase Server...? 是否有可能用Firebase Server实施GCM ...?
if it is then how we can do it.? 如果可以的话,我们该怎么做。
Example i have a chat application in which the back-end server is firebase only no other services and also the authentication system of firebase is implemented then how we send the notification to specific user to notify that there is some msgs from other users. 示例我有一个聊天应用程序,其中后端服务器是firebase,仅没有其他服务,并且还实现了firebase的身份验证系统,然后我们如何将通知发送给特定用户,以通知其他用户有一些消息。

From the landing page of Google Cloud Messaging : Google Cloud Messaging登录页面中

Google Cloud Messaging (GCM) is a free service that enables developers to send messages between servers and client apps. Google Cloud Messaging(GCM)是一项免费服务,使开发人员能够在服务器和客户端应用程序之间发送消息。 This includes downstream messages from servers to client apps, and upstream messages from client apps to servers. 这包括从服务器到客户端应用程序的下游消息,以及从客户端应用程序到服务器的上游消息。

Firebase is a back-end as a service that provides a set of APIs that your application can talk to. Firebase是一种后端服务,提供您的应用程序可以与之交谈的一组API There is currently no Firebase API to send push notifications to clients. 当前没有Firebase API向用户发送推送通知。

Firebase currently doesn't allow running your code on their servers. Firebase当前不允许在其服务器上运行代码。

This means that you will need to run code on a server of your own to send the messages through GCM. 这意味着您将需要在自己的服务器上运行代码以通过GCM发送消息。

Typically developers using Firebase have their (Android or other) apps push the notification information to a location in Firebase, where a server-side script then reads the information from and calls Google Cloud Messaging. 通常,使用Firebase的开发人员可以将其(Android或其他)应用程序将通知信息推送到Firebase中的某个位置,然后服务器端脚本从该位置读取信息并调用Google Cloud Messaging。 This type of queue based approach is quite common with Firebase and is covered as pattern 2 in this article about Firebase application architectures . 这种类型的基于队列的方法在Firebase中非常常见,在有关Firebase应用程序体系结构的本文中作为模式2进行了介绍

Firebase Cloud Messaging (FCM) is the new version of GCM. Firebase Cloud Messaging(FCM)是GCM的新版本。 It inherits the reliable and scalable GCM infrastructure, plus new features! 它继承了可靠且可扩展的GCM基础架构以及新功能! See the FAQ to learn more. 请参阅常见问题以了解更多信息。 If you are integrating messaging in a new app, start with FCM. 如果要将消息传递集成到新应用中,请从FCM开始。 GCM users are strongly recommended to upgrade to FCM, in order to benefit from new FCM features today and in the future. 强烈建议GCM用户升级到FCM,以便从现在和将来受益于新的FCM功能。

[Source: https://developers.google.com/cloud-messaging/topic-messaging#sending_topic_messages_from_the_server - 18 May 2016] [来源: https//developers.google.com/cloud-messaging/topic-messaging#sending_topic_messages_from_the_server-2016年 5月18日]

So the answer now is yes, and you can follow this link (and the previous one) to have more information on how you can do it. 因此,现在的答案是肯定的,您可以单击此链接 (和上一个链接 )以获取有关如何操作的更多信息。

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

相关问题 在谷歌云消息传递为Android - In Google cloud messaging for android 使用XMPP服务器和Google云消息传递(或更新的Firebase云消息传递)进行推送通知的Android应用程序App - Chat App for Android using a XMPP Server and Google Cloud Messaging (or the newer Firebase Cloud Messaging) for Push Notifications 使用Java将HTTP发布到Google Cloud Messaging(Android推送通知) - HTTP Post to Google Cloud Messaging (Android Push Notification) using Java Firebase云消息传递-未收到任何消息(Android) - Firebase Cloud Messaging - Not receiving any messages (Android) 使用MySql在Java中实现Google Cloud消息传递 - Google Cloud messaging implementation in Java using MySql 如何使用 MainActivity.java 文件夹中的 android 工作室(Firebase 云消息传递)订阅主题? - How to subscribe to a topic using android studio (Firebase Cloud Messaging) in the MainActivity.java folder? Google Cloud Messaging开发人员android代码崩溃 - Google Cloud Messaging developer android code crashing 带有Google Cloud消息传递的android推送通知库 - android push notifications library with google cloud messaging 来自Java而不是Firebase控制台的Firebase云消息传递通知 - Firebase Cloud Messaging notification from Java instead of Firebase Console Firebase Cloud Messaging使用Java发送HTTP-Post - Firebase Cloud Messaging Send HTTP-Post in Java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM