I'm working on a progressive web app (PWA) that will also get embedded into an Android app with Apache Cordova. Will Web Push Notifications work for an Apache Cordovo Android app like native push notfications or do I need to use a plugin for that?
PWA will be just a SPA which will render on web-view and Cordova will provide the bridging between native and PWA.
Now the point, is Cordova support PWA?
In general, Cordova has little to do with PWAs. Yes, there is a Cordova browser platform . But that does not matter much, because very few plugins support it. You need to check the docs of each plugin you are using, to see if they support the browser platform.
As far as your requirement looks you can use use phonegap-plugin-push which also support browser platform.
Reference:
1. https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PLATFORM_SUPPORT.md
2. https://github.com/phonegap/phonegap-roadmap/issues/180
I would like to add an update to this question. As of 2021, Phonegap is no longer maintained and has been discontinued by Apache.
On their website
Adobe has discontinued PhoneGap Build and ended investment in PhoneGap and Apache Cordova.
On August 2020 Apache wrote this article on their 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.
If you are developing a PWA or Hybrid app, you are better off utilizing Ionic or BEST case scenario the Cordova Cli. Phonegap and any phonegap components and/or plugins should not be a solution of choice if you want to avoid smashing your head up against a wall further down the line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With