简体   繁体   English

Firebase云消息传递应该适用于移动设备吗?

[英]Is Firebase Cloud Messaging supposed to work on mobile devices?

I'm trying to set up background and foreround push notifications for a website using Firebase Cloud Messaging, but it doesn't appear to be working on mobile browsers. 我正在尝试使用Firebase云消息传递为网站设置后台和前置推送通知,但它似乎不适用于移动浏览器。

I've tested it and it works fine on Firefox and Chromium on macOS, but it doesn't on Firefox and Chrome on Android, and Safari on iOS. 我测试了它,它在macOS上的Firefox和Chromium上运行良好,但它不适用于Android上的Firefox和Chrome,以及iOS上的Safari。

I tried debugging with remote devtools on Chrome and the console says the browser doesn't have the APIs necessary for Firebase Cloud Messaging. 我尝试在Chrome上使用远程devtools进行调试,控制台说浏览器没有Firebase云消息传递所需的API。 I'd understand Firefox and Safari but Chrome is developed by Google so I assumed it'd work with Firebase, so I was wondering if mobile browsers really are unsupported or if I was doing something wrong? 我了解Firefox和Safari,但Chrome是由Google开发的,所以我认为它适用于Firebase,所以我想知道移动浏览器是否真的不受支持,或者我是否做错了什么?

Thanks! 谢谢!

According to the documentation : 根据文件

The FCM JavaScript API lets you receive notification messages in web apps running in browsers that support the Push API . FCM JavaScript API允许您在支持Push API的浏览器中运行的Web应用程序中接收通知消息。 This includes the browser versions listed in this support matrix . 这包括此支持矩阵中列出的浏览器版本。

Click the support matrix link to find out which browsers support the Push API. 单击支持矩阵链接以找出支持Push API的浏览器。

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

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