gpt4 book ai didi

push-notification - ionic-native Push Notifications 可以在浏览器中运行吗?

转载 作者:行者123 更新时间:2023-12-02 04:36:11 25 4
gpt4 key购买 nike

我即将实现ionic-native Push Notifications .这可以在浏览器中运行吗?还是我需要安装 iOS/Android 模拟器?

最佳答案

除非您使用 Phonegap 推送服务器,否则它无法在浏览器上运行。请引用Phonegap Push Plugin文档。

Browser details

Browser quirks

For the time being push support on the browser will only work using the PhoneGap push server.

When you run phonegap serve to test browser push point your browser at http://localhost:3000. The browser push implementation uses the W3C Push Spec's implementation which relies on ServiceWorkers and ServiceWorkers can only be accessed via the https protocol or via http://localhost. Pointing your browser at localhost will be the easiest way to test.

Browser Support

Chrome 49+ Firefox 46+

注意:为了使其在 Android 模拟器中运行,需要进行特殊配置。如果可以的话,我建议使用真实设备。另外,iOS 模拟器不能(根本不能)模拟推送通知。在这种情况下,您必须使用真实设备。

关于push-notification - ionic-native Push Notifications 可以在浏览器中运行吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42361479/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com