Web*_*dev 5 javascript firebase-cloud-messaging
我正在使用 FCM 库实现网络推送通知。我在域的根文件夹中创建了一个 service worker 文件,并在项目中创建了另一个 js 文件来显示网络推送通知。
网络推送通知工作正常并显示在浏览器中。根据文档,根文件夹中需要带有 gcm 发件人 ID 的 manifest.json。我还没有创建这个网络应用程序清单文件,但我仍然可以在 Chrome 浏览器中看到通知。
任何人都可以澄清为什么需要 manifest.json。
For Chrome to route FCM messages to the correct service worker, it needs to know the Sender ID
Run Code Online (Sandbox Code Playgroud)
看看这些页面:
https://developers.google.com/web/fundamentals/push-notifications/ https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications
| 归档时间: |
|
| 查看次数: |
1827 次 |
| 最近记录: |