为什么我们需要带有FCM的推送通知提供程序 [英] Why do we need a push notification provider with FCM

查看:74
本文介绍了为什么我们需要带有FCM的推送通知提供程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对推送通知的整个概念完全陌生.我已经编写了一个后端服务器,并将推送通知从该服务器发送到Android应用程序,该应用程序也由我编写.但是我的问题是:

I am completely new to the whole concept of push notifications. I have written a back-end server and I will send push notifications from it to the Android app, which is also written by me. But my question is:

我真的需要或者为什么需要推送通知服务?

谢谢!

推荐答案

如果您想使用FCM发送推送通知,则有时必须有人向Google的FCM服务发出请求,因为Google是唯一的一个可以通过FCM向设备发送消息的人.同样适用于APNS,有时需要有人向苹果的APNS服务提出请求

If you want to use FCM to send push notifications, at some point in time, someone has to make a request to Google's FCM service, because Google is the only one, who can send a message to a device via FCM. Same applies for APNS, at some point in time, someone has to make a request to Apple's APNS service

根据您的要求,您可以自己编写代码,也可以使用一些第三方提供商.使用第三方供应商可能会带来好处.例如,他们可能负责令牌管理,或提供一个发送到Android和iOS设备的单个请求,依此类推.但最终,还有第三方供应商代表您向Google或Apple发送请求.

Depending on your requirements, you can do this yourself in your own code or you can use some 3rd party provider. Using a 3rd party provider MAY have benefits. For instance they may take care of token management, or provide a single request for sending to Android and iOS devices, and so on and so forth. But in the end of the day, also a 3rd party provider sends out requests to Google or Apple in your behalf.

这篇关于为什么我们需要带有FCM的推送通知提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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