Web 推送通知在 Apache Cordova Android 应用程序中工作吗?
Do Web Push Notifications work in an Apache Cordova Android app?
我正在开发一个 渐进式网络应用程序 (PWA),它也将嵌入到带有 Apache Cordova 的 Android 应用程序中。 Web Push Notifications 是否适用于 Apache Cordovo Android 应用程序,例如 native push notfications 还是我需要为此使用插件?
PWA 将只是一个 SPA,它将呈现在 web-view 和 Cordova 将提供 native 和 PWA.
之间的桥接
重点来了,Cordova支持PWA吗?
总的来说,Cordova和PWAs关系不大。是的,有一个 Cordova 浏览器平台 。但这并不重要,因为很少有插件支持它。您需要检查您正在使用的每个插件的文档,看看它们是否支持 浏览器平台 。
根据您的要求,您可以使用 phonegap-plugin-push,它也支持 浏览器平台.
参考:
1. https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PLATFORM_SUPPORT.md
我想更新这个问题。截至 2021 年,Phonegap 不再维护并已被 Apache 停用。
Adobe has discontinued PhoneGap Build and ended investment in PhoneGap
and Apache Cordova.
2020 年 8 月,Apache 在他们的 blog
上写了这篇文章
In the context of these developments and declining PhoneGap usage,
Adobe is focusing on providing a platform that enables developers to
build, extend, customize and integrate with Adobe products. Today, we
are announcing the end of development for PhoneGap and PhoneGap Build
and the end of our investment in Apache Cordova. The PhoneGap Build
service will be discontinued on October 1, 2020.
如果您正在开发 PWA 或混合应用程序,最好使用 Ionic or BEST case scenario the Cordova Cli。如果您想避免将头撞到墙上,Phonegap 和任何 phonegap 组件 and/or 插件不应该是选择的解决方案。
新解决方案 (2021)
- 带推送通知的 Ionic 框架
- Cordova Cli 推送插件
我正在开发一个 渐进式网络应用程序 (PWA),它也将嵌入到带有 Apache Cordova 的 Android 应用程序中。 Web Push Notifications 是否适用于 Apache Cordovo Android 应用程序,例如 native push notfications 还是我需要为此使用插件?
PWA 将只是一个 SPA,它将呈现在 web-view 和 Cordova 将提供 native 和 PWA.
之间的桥接重点来了,Cordova支持PWA吗?
总的来说,Cordova和PWAs关系不大。是的,有一个 Cordova 浏览器平台 。但这并不重要,因为很少有插件支持它。您需要检查您正在使用的每个插件的文档,看看它们是否支持 浏览器平台 。
根据您的要求,您可以使用 phonegap-plugin-push,它也支持 浏览器平台.
参考:
1. https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PLATFORM_SUPPORT.md
我想更新这个问题。截至 2021 年,Phonegap 不再维护并已被 Apache 停用。
Adobe has discontinued PhoneGap Build and ended investment in PhoneGap and Apache Cordova.
2020 年 8 月,Apache 在他们的 blog
上写了这篇文章In the context of these developments and declining PhoneGap usage, Adobe is focusing on providing a platform that enables developers to build, extend, customize and integrate with Adobe products. Today, we are announcing the end of development for PhoneGap and PhoneGap Build and the end of our investment in Apache Cordova. The PhoneGap Build service will be discontinued on October 1, 2020.
如果您正在开发 PWA 或混合应用程序,最好使用 Ionic or BEST case scenario the Cordova Cli。如果您想避免将头撞到墙上,Phonegap 和任何 phonegap 组件 and/or 插件不应该是选择的解决方案。
新解决方案 (2021)
- 带推送通知的 Ionic 框架
- Cordova Cli 推送插件