Android-Firebase Cloud Messaging设备到设备的推送通知,无需服务器 [英] Android - Firebase Cloud Messaging Device to Device Push Notification Without Server

查看:53
本文介绍了Android-Firebase Cloud Messaging设备到设备的推送通知,无需服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在没有服务器的情况下在2个android设备之间发送推送通知?

Is there a way to send push notification between 2 android devices without a server?

我找到了一些教程,但是所有教程都使用node.js发送通知.(或者我发现一些使用Firebase控制台执行此操作的示例)

I found some tutorials but all of them was using the node.js for sending a notification. (Or I found that some samples that were using the firebase console for doing this)

推荐答案

不是,

您需要一个服务器"来进行推送通知.正如您提到的,firebase是其中之一,您可以使用多种服务来做到这一点.您可能不需要完整的服务器,但是您需要某种服务才能做到这一点,您不能简单地立即在设备之间发送通知:

You need a "server" to do push notification. You can use a variety of services to do that, as you mentioned firebase is one of them. You may not need a full on server, but you need some kind of service to do that, you can't simply send notifications between devices straight away:

一些例子是:

AWS无服务器功能

firebase中的云函数

如果您想使用其中一项服务,则需要在应用中配置FCM,您可以在此处:)

If you'd rather use one of these services, then you'll need to configure FCM in your app, you can check how to do that in the docs. And some nice sample codes here :)

这篇关于Android-Firebase Cloud Messaging设备到设备的推送通知,无需服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆