使用 Google App Engine 和 Firebase Cloud Messaging 发送通知

凯蒂

我的一些总体问题:

  1. 如何在 Google App Engine 上创建 Node.js 项目?
  2. 通过打开 Google Cloud Shell 并转到“文件”>“启动代码编辑器”来编辑项目是否正确?
  3. 您如何使用 Google App Engine 收听 Firebase?

细节:

所以我知道这之前已经被问过很多次了,但我已经阅读并环顾四周,我仍然不知所措。基本上,我的 Android 应用程序中有一个使用 Firebase 的聊天部分(工作正常),但我想在用户收到他们尚未看到的消息时发送通知,就像大多数聊天应用程序一样。

这是我关注的通知部分(https://firebase.googleblog.com/2016/08/sending-notifications-between-android.html)。到目前为止我(认为我)理解的内容,但如果我没有做对,请纠正我:

  • 您将通知放入 Firebase 的队列中
  • 您使用单独的环境来收听 Firebase 并发送通知
  • 您为用户订阅了一个主题(在我的例子中是一个事件)

我关于这部分的主要问题是我应该把 Node 代码放在世界上的什么地方。我尝试将其放在Hello World代码所在的位置,但出现错误。

我的第二部分是试图找出 Google App Engine。我把内置的 Hello World 教程搞得一团糟,我设法把“世界”这个词改成了别的东西。除此之外,我仍然很困惑,我还没有找到一个超级分解的分步教程。我不知道我是使用了糟糕的关键字还是什么,但我什至不知道如何在您的 Google Cloud Platform 项目中创建一个新的“项目”。

对不起,如果这是很多混乱的词。基本上我真的很困惑哈哈。即使只是知道从哪里开始学习这些信息的想法也会非常有帮助,因为我的搜索或关键字会产生我不理解的结果。谢谢!

布拉德肖

就在上周,谷歌实际上发布了一项名为 Cloud Functions 的功能,听起来它可以完美地处理您的用例。它允许您将 Node.js 放在 Firebase 上,并且在某些情况下无需您设置服务器。使用 Firebase 函数,您可以让实时数据库更改触发要发送的通知。

我建议您通读所有 Firebase 函数文档,但这正是您特别需要查找的内容:https : //firebase.google.com/docs/functions/database-events

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

使用XMPP服务器和Google Cloud Messaging(或更新的Firebase Cloud Messaging)进行推送通知的Android聊天应用程序

使用Firebase Cloud Messaging创建每日推送通知

如何在不使用Firebase控制台的情况下发送Firebase Cloud Messaging通知?

如何使用Firebase Cloud Messaging自动增加iOS通知徽章?

google Cloud Messaging推送通知

Google Cloud Messaging vs Firebase

Google Cloud Messaging与Firebase

Firebase Cloud Messaging android项目不发送推送通知

如何从Google App Engine应用程序发送Firebase Cloud消息

使用Firebase Cloud Messaging安排推送通知

是否可以使用Firebase Cloud Messaging在JSON推送通知主体中发送粗体文本?

使用Firebase Cloud Messaging在IOS PWA上实现推送通知

Firebase Cloud Messaging成功发送sendToDevice,但没有通知

使用Admin SDK发送1000多个通知-Firebase Cloud Messaging

如何编写Firebase Cloud Messaging功能以发送推送通知

Xamarin iOS Firebase Cloud Messaging-推送通知-无法使用设备令牌发送测试消息

Firebase Cloud Messaging推送和应用内通知

Firebase Cloud Messaging删除通知

Google Cloud Datastore和Flask App Engine

带有Google Cloud Messaging和Google App Engine作为后端的Android推送通知

使用Google Cloud Messaging和Phonegap插件推送设置iOS推送通知

使用Google Cloud Messaging的推送通知错误

如何使用 ionic 3 和 Firebase Cloud Messaging 从通知栏打开特定页面?

Google Cloud:存储和 App Engine

如何使用 Firebase Cloud Messaging 从应用程序发送通知?

使用“数据”和“通知”发送通知 Firebase

使用 Firebase Cloud Functions、Messaging、Firestore 制作自动通知

我可以在不使用 Firebase 的情况下将 Firebase Cloud Messaging (FCM) 与 Google Compute Engine 结合使用吗?

如何使用 Firebase Cloud Messaging 发送静默通知/后台通知?