doufan1363 2019-05-09 06:12
浏览 171

更改位置firebase-messaging-sw.js

I am trying to use Web Push Notification Using Firebase Cloud Messaging.

The service worker script is expected to be on the absolute path of the application! For example : http://127.0.0.1/firebase-messaging-sw.js

How to change this default location?! Searching the official docs I found this method: useServiceWorker which accepts a service worker registration, but trying to use it I get an error that the method doesn't even exist!

So, How to change the location of the service worker for firebase messaging?

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
    • ¥15 乘性高斯噪声在深度学习网络中的应用
    • ¥15 运筹学排序问题中的在线排序
    • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
    • ¥30 求一段fortran代码用IVF编译运行的结果
    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛