PWA - How to access Cordova plugins in PWA web applications ?


Hi, I am using “cordova-plugin-qrscanner” in my ionic application. I am able to access all the features from this plugin when run my ionic app as either ios/android app(run on device or generate apk, ipa). But when I run this app as PWA(Progressive Web App), I cannot access any of the plug in features. Kindly guide me how can I access plug in features in PWA. Probably I am missing something linking plugin or something else. Any help with example would be a great help.


Cordova plugins will not work on the web. There are some that do have web versions, like Geolocation, Camera, but most do not.

You will need to find alternate solutions to that functionality if your app needs that function.


cordova itself works on browser.

If the plugin you want to use supports browser platform, you can use it on browser, like @ionic-native/google-maps and cordova-plugin-googlemaps.


You can’t access cordova plugins from the browser.

You just can’t!!!

The ionic/native stuff I think does confuse people into thinking this stuff can work. It’ll wrap some stuff but not others.

You’ll need an HTML5 version for what you need.


It seems the cordova-plugin-qrscanner supports browser platform at least.

I guess you execute your app as ionic serve.
But you need to execute ionic cordova run browser instead.



Hi, just tried that plugin. Works on native for mobile, couldn’t get it working via PWA - though in the notes it does say it wraps browser’s native qr reader.
Good luck


Dose it means we can use cordova plugins in PWA if the plugin supports browser platform? Because I need email-composer in PWA, I want to clarify it if it’s possible or not. Thanks.


For email composition you’ve got regular mailto anchor tags which have been around forever, which can carry the subject line and body.

This would be kinda ideal for the pwa situation