How to use Cordova plugins with PWA
Question

Hi,

I'm working on a PWA that I want to use a Cordova plug-in with, specifically this forge component https://www.outsystems.com/forge/component-overview/1936/badge-plugin

I know it won't work on the web browser, but When testing it after installing it/Adding it to Home screen, it still doesn't work. I was looking for an answer and I found that Cordova plugins doesn't work straight forward with PWA. So how can I do that with Outsystems? Any ideas or advice?

https://stackoverflow.com/questions/45004317/is-it-possible-for-cordova-plugins-to-work-with-pwa#:~:text=There%20is%20no%20way%20to,add%20to%20home%20screen%20option%22.

Hello Abeer elAssal

That plugin does not work because is not compatible.

You can read about pwa here: https://success.outsystems.com/Documentation/11/Delivering_Mobile_Apps/Distribute_as_a_progressive_web_app

As explained in the link, As pwa is very recent there are few plugins compatible, so you need to wait for a new version of that component.

Be aware the latest version of that component is stable only for v10 of the service studio. You can try in v11 but it can face some issues

Regards

Gonçalo Almeida


Thanks for your reply I'm actually looking for a solution for that, it's mentioned on the link a way but I was looking for an advice how to follow.

Hi Abeer,

In PWA, no cordova plugins are supported. You can check on this website https://whatwebcando.today/ what HTML5 capabilities you can use in PWA and maybe use your own plugin to accomplish this. However i don't think there is a PWA/HTML5 workaround for your desired use case. That would require a native application.

Thanks for your reply, it's said on the link that there's a way i didn't figured it out yet but will keep searching.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.