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.