[Barcode Plugin] BarCode PlugIn - Requirements for PWA

Forge Component
(26)
Published on 21 May by OutSystems R&D
26 votes
Published on 21 May by OutSystems R&D

Hi
I am testing the plug-in with a PWA application and I get the error "Cordova is not available", is it necessary to make any special configuration in the module? Maybe add it as "Extensibility Configuration" or something similar? How do you do this ?

As far as I understand it, It won't work unless the plugin was made to have browser support.

Interesting topic, hopefully more people will comment

Solution

Hello,


I'm with Filipe, unless the plugin supports browser it shouldn't work, some plugins you can use if you use something like ionic, see link bellow for example.

https://forum.ionicframework.com/t/pwa-how-to-access-cordova-plugins-in-pwa-web-applications/147575/3


With the best regards,

Gonçalo

Solution

Hey guys,

We are currently improving our plugins to also address the PWA use case. All the plugins rely on cordova, which are not being shipped for Reactive Web Apps / PWAs. 

With this in mind, we've released today a camera plugin, that works both on the browser and on the mobile device. The actions are the same, and the plugin adapts to the device it is running on (web or mobile device).

Afterwards, we are planning on addressing the bar code, local notifications and geolocation.

Stay tuned for more plugins :)

Regards,

Ricardo Alves

great news ..
Thanks to all team Outsystems..

Hello,

we would like to install the barcode plugin in our PWA app.

Per OutSystems Now app the plugin works even wonderful ... However, OS Now app will terminate in November 2020th and it only makes sense for testing and training.

So is there any news about the barcode plugin to use in PWA?

Best regards

Ricardo Vaz Alves wrote:

Hey guys,

We are currently improving our plugins to also address the PWA use case. All the plugins rely on cordova, which are not being shipped for Reactive Web Apps / PWAs. 

With this in mind, we've released today a camera plugin, that works both on the browser and on the mobile device. The actions are the same, and the plugin adapts to the device it is running on (web or mobile device).

Afterwards, we are planning on addressing the bar code, local notifications and geolocation.

Stay tuned for more plugins :)

Regards,

Ricardo Alves

 

 Hi Ricardo,


Thank you for your effort. I am currently facing this issue with barcode scanner in PWA. By combining CameraPlugin to take a picture and ZXingLib to later process it, I could get this to work. However it is not reliable due to picture quality or angle or other reasons. 

I can see that plugins for mobile projects use cardova, which is not available in PWA, but there is ReactQR_lib to scan qr code in PWA but only QR code. It uses video stream which would be great to adopt for better scanning, but i dont know how. I am not familiar with mobile app development and if anyone could point me into right direction on what OutSystem is using in backend, is it Ionic or PhoneGap. 


Cheers,


Anatolii

To anyone who is still struggling with bar code scanning on PWA, I have working solution, which is not universal but might work for you.

First of all we need to get permission to connect to media devices such as camera/mic. Once we get that we can start streaming video to our canvas object on the page. After that we can process each bit by scanner.

Scanner project that worked for me: https://github.com/mubaidr/Javascript-Barcode-Reader 

More about media and permissions: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia 

And in terms of implementation video stream in PWA get this scanner https://www.outsystems.com/forge/component-overview/8773/react-qr-scanner and look at the structure.

Cheers,

Anatolii

Hello Ricardo Alves,

In February you said: "Afterwards, we are planning on addressing the bar code, local notifications and geolocation."

I would like to ask: Is there a schedule when the BarCode plugin will also be available for PWA?

Outsystems Now App will be terminated soon ... then there is no longer even the possibility to test. 

With the best regards