Opening CAMERA causes VUEJS to RELOAD.. Jesus...

I recently asked a question because I was trying to use the “capacitor-community/barcode-scanner” plugin with Ionic + VueJS. but I finally gave up. I can’t get it to work.

So I decided to try Ionic Native plugin “Barcode Scanner | Install Camera Barcode Scanner Plugin” , w ith the project: “GitHub - StarleyDev/barcodescanner-sdk31: cross-platform BarcodeScanner for Cordova / PhoneGap” , i managed to make the application compile correctly for Android 11. But look at the this strange behavior, if I call the plugin through the VUE component:

It seems that VUEJS fully reloads right after I call the camera. And even reading the barcode, now that everything has been reloaded, the callbacks don’t work. But if I call it directly from the console:

Works correctly and doesn’t reload the VUEJS, i believe the problem is the same that is causing the Capacitor plugin to malfunction. Any ideias?

I tried calling “SCAN” in several ways, through the BarcodeScanner class, natively through ‘window.cordova’ and nothing helped me. Same result every time.

seems someone gave you an answer.

Hey, I’ll chime what has been said already.

  1. The barcode scanner you have linked to are for older cordova projects, which ionic/vue does not support.

You should use this barcode scanner instead.

  1. In order for use to help, providing more details/steps to reproduce is needed. Just sharing some screen shots does not provide enough context for the community. We need code in order to reproduce.