文件名称:pwa-FCM:使用FCM的渐进式Web App推送通知
文件大小:36KB
文件格式:ZIP
更新时间:2024-05-21 17:30:56
JavaScript
STEPS TO FOLLOW: SERVER SIDE: 1) Create a cloud function and deploy it on firebase CLIENT SIDE: 1)Ask for permission using requestPermission method 2)Initialize two listeners in service worker i)push listener ii)notificationClick (only if you want to implement click action) 3) Use this fetch request to send notification fetch("yourFunctionUrlHere", { method: 'PO
【文件预览】:
pwa-FCM-master
----client()
--------index.js(744B)
--------images()
--------firebase-messaging-sw.txt(3KB)
--------firebase-messaging-sw.js(1KB)
--------manifest.json(390B)
--------index.html(2KB)
--------favicon.ico(4KB)
----functions()
--------functions()
--------.firebaserc(67B)
--------firebase.json(3B)
----readme.md(707B)
----.gitignore(64B)