Search code examples
androidcordovapush-notificationweb-push

Do Web Push Notifications work in an Apache Cordova Android app?


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?


Solution

  • 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