Why won't the camera open when I'm using Ionic 7 + Vue 3 with TypeScript, and the same version of the scanner library? I also tried migrating from TypeScript to JavaScript, and it's still the same. Why?
In a situation where I would want the camera to display on a card when the app is opened, how do I go about it? I would not want to use a button to trigger the opening of the sanner. the scanner should automatically open when the app opens.
if you don't want to use a button to trigger the opening of the scanner, just ensure you call the 'startScanning' function from 'onMounted' in your code. Here's a quick snippet: onMounted(async () => { isSupported.value = (await BarcodeScanner.isSupported()).supported; if (!isSupported.value) { presentAlert('Error', 'Sorry, Barcode Scanner is not supported on your device.'); return; } startScanning(); })
Good job ❤
Thank you so much 😀
merci pour le tutorial
De rien, je suis content que ça t'ait plu.
thanks
You're welcome!
Great content.
Well done
thank you
damn i really2 need video, thank you brother u earn my subs
Thank you. I'm glad you enjoyed the content. welcome to the community.
Good video !!! You could build your channel on Ionic and PWAs. Best wishes.
Thanks for the idea!
Bhai ye project mil sakta hai file practice karne ke liye?
Sure! You can find the project files on my GitHub here: github.com/ousmaalMassi/qr-code-reader
New Ionic Project,This create way need to install which plugin in VS Code?
You need to install the official extension for Ionic and Capacitor. The name is "Ionic".
Google barcode scanner module is not availiable
Try using npm:
npm install @capacitor-mlkit/barcode-scanning
npx cap sync
Why won't the camera open when I'm using Ionic 7 + Vue 3 with TypeScript, and the same version of the scanner library? I also tried migrating from TypeScript to JavaScript, and it's still the same. Why?
Check if you added the permission in the AndroidManifest.xml file as it shows in minute 1:00
In a situation where I would want the camera to display on a card when the app is opened, how do I go about it? I would not want to use a button to trigger the opening of the sanner. the scanner should automatically open when the app opens.
if you don't want to use a button to trigger the opening of the scanner, just ensure you call the 'startScanning' function from 'onMounted' in your code. Here's a quick snippet:
onMounted(async () => {
isSupported.value = (await BarcodeScanner.isSupported()).supported;
if (!isSupported.value) {
presentAlert('Error', 'Sorry, Barcode Scanner is not supported on your device.');
return;
}
startScanning();
})
Unfortunately I don't think it's possible to use the camera inside the card,
is there any link on the source code?
Yes, here it is:
github.com/ousmaalMassi/qr-code-reader.git
Let me know if you have any questions or need further information
@@Amen-zu Thank you very much!