How to Build an Ionic Barcode Scanner with Capacitor

  Рет қаралды 44,605

Simon Grimm

Simon Grimm

Күн бұрын

Пікірлер: 116
@arionpaul6208
@arionpaul6208 Жыл бұрын
Now it works in web too!!!!
@galaxies_dev
@galaxies_dev Жыл бұрын
Nice!
@FedorMashoshin
@FedorMashoshin 3 жыл бұрын
Simon, you are the best Ionic teacher ever! Really appreciate everything that you've done so far. Capacitor barcode scanner works flawlessly.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Thank you so much Fedor, and happy to hear it works for you :)
@GosuMania
@GosuMania 3 жыл бұрын
Does it work with qrCodes or barcodes?
@tarikfares6579
@tarikfares6579 3 жыл бұрын
hello, one question please how do you do to make the test in a real device and show the result in the emulator?
@fernandolopezramirez4463
@fernandolopezramirez4463 3 жыл бұрын
It works perfectly if you follow the tutorial step by step. Thanks a lot! 😃
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Great to hear!
@nadimmatoussi8772
@nadimmatoussi8772 8 ай бұрын
Thank for the tutorial. Although in more recent versions capacitor have added a method to remove the background but I'm still facing the issue and this how i came to your video 😅
@chacataplan
@chacataplan Жыл бұрын
Hello, thanks for the tutorial, can this be configured to read MRZ code?
@DennisSmink
@DennisSmink 3 жыл бұрын
I'm dying for Capacitor 3 support, though 🙃
@ConvertPublicidade
@ConvertPublicidade 3 жыл бұрын
Hi Simon! Thanks for sharing your knowledge, I follow your instructions, but, a instruction: [style.--background]="scanActive ? '#00000000' : '#fff'" don't work, when I active scanner the background not stay transparent. Could you help with another instruction? Thanks a lot.
@adiem777
@adiem777 Жыл бұрын
hello.... What version of Angular did the project work in Angular 16?
@willianriviera2398
@willianriviera2398 Жыл бұрын
Hi Simon, I hope you are well. Can you tell me how you use this video livereload? Thanks
@GerardoPacheco
@GerardoPacheco Жыл бұрын
Hello I really like the console log you used. Is it some plugin?
@marquescx9959
@marquescx9959 Жыл бұрын
Hi Simon, how do I enable only the front camera to scan?
@brambatimoreira
@brambatimoreira 2 жыл бұрын
Hi Simon, thanks for the video, but I have capacitor 3 and I can't import the BarcodeScanner can you comment with the link of the video you teach?
@Melrix
@Melrix 2 жыл бұрын
In case someone has a same problem that I had. If the camera preview is not showing, try to delete DARK scheme in theme/variable.scss. These styles were somehow blocking my preview.
@galaxies_dev
@galaxies_dev 2 жыл бұрын
Very interesting - thanks for sharing!
@VanchoSpiegel
@VanchoSpiegel 2 жыл бұрын
took me 4 days to realize that this comment solve my problem XD thank you
@CastingSpell
@CastingSpell 2 жыл бұрын
What if you have another page behind? I access the scanner from another page, when i set the ion content transparent, I can see the page from before
@galaxies_dev
@galaxies_dev 2 жыл бұрын
Why is that page still visible? But I guess you need to find a way to make that page transparent as well in that case!
@CastingSpell
@CastingSpell 2 жыл бұрын
@@galaxies_dev Thanks for answering, I was using a paid template, and turns out I was working in a modal page, everything solved now! Keep up that great work, you have helped me a lot
@joelcool1027
@joelcool1027 3 жыл бұрын
Thank you for these amazing videos Sir 🙏🏾
@galaxies_dev
@galaxies_dev 3 жыл бұрын
My pleasure!
@juanCarlosBA
@juanCarlosBA 3 жыл бұрын
Simon, its perfect the proyect but i have capacitor 3.0, how can i do....
@RaviMittal84
@RaviMittal84 Жыл бұрын
Hi Simon, Thanks for the wonderful demo, however I am facing an issue while implementing it on my app. Actually I have multiple ion-content with router-outlet. Can you suggest what would be the ideal way implementing this. Additionally, we have ion-tabs control
@chuongnv289
@chuongnv289 Жыл бұрын
i using capacitor-community/barcode-scanner version 1.2.1, capacitor 2 and it not show camera, can you help me ?
@hossamelsayed4441
@hossamelsayed4441 3 жыл бұрын
does it required to add code in MainActivity ? because in github repo didn't mention that
@zvonimirlokmer3962
@zvonimirlokmer3962 3 жыл бұрын
I've just tried and it is needed.
@hossamelsayed4441
@hossamelsayed4441 3 жыл бұрын
@@zvonimirlokmer3962 It's worked with me without add any code inside MainActivity .. are you use capacitor 3?
@aleksandrmatyka3118
@aleksandrmatyka3118 Жыл бұрын
I found that when we start scanning from landscape mode it shows camera wrong and I don't know if it is fixable( I think this may have something to do with the way the camera orientation control itself is connected.
@ЮрийКустов-ф4у
@ЮрийКустов-ф4у 3 жыл бұрын
You are the best. thanks from Ukraine!!)
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Thanks and greetings from Germany 👋
@girishfuluskar7026
@girishfuluskar7026 2 жыл бұрын
Hi Simon Can you advise how can we implement continues scanning in ionic with this same implementation
@galaxies_dev
@galaxies_dev 2 жыл бұрын
I'm not sure if it's supported with this plugin :/
@vampirejs758
@vampirejs758 3 жыл бұрын
Dude I created a blank ionic angular app and compiled it for android with capacitor , it was just a blank boiler plate of ionic 5 but still it took a lot of time to start , the device that I am using has a good amount of ram and is the latest version of android. What should I do , or rather what's going wrong
@ingjuliosg
@ingjuliosg 10 ай бұрын
The problema that I have is the camera show in front not back and not found for that very well
@tonywong8211
@tonywong8211 2 жыл бұрын
can I follow this video today?
@galaxies_dev
@galaxies_dev 2 жыл бұрын
Yes!
@CarlosSK
@CarlosSK 3 жыл бұрын
hi simon, how to share the screen of your physical device to your pc? do you use any software ?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Yes I use Reflector on my Mac for that!
@monicaria735
@monicaria735 3 жыл бұрын
Hi Simon, this works with ionic 4 but not with ionic 6. The backgrouns does not become transparent. In previous versions everything was ok. Do you have any suggest? Thanks so much!
@galaxies_dev
@galaxies_dev 3 жыл бұрын
I'll have to check it out again - not sure what caused that change!
@jeyaganeshans4652
@jeyaganeshans4652 3 жыл бұрын
Hi Simon, thanks for wonderful tutorial. I followed this tutorial step by step. It is amazing that it worked for me. But it works for only first time. I could scan QR code. If i close the app and then open it, camera is not opening, i can see only dark screen. What could be wrong?
@myriamekemala9649
@myriamekemala9649 2 жыл бұрын
hey,I have the same problem(iOS), did you find any solution for that please?
@TungNguyen-xw4hr
@TungNguyen-xw4hr 3 жыл бұрын
Can you make a video on how to use the card-io? I'm looking forward to it
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Looks interesting, I'll see what I can do!
@alikhan-eu2wc
@alikhan-eu2wc 3 жыл бұрын
Hi Simon, I have developed an ionic app and it has the QR CODE SCANNER. But I want the code to get scanned from gallery. Can you please help me achieve this into the QR Scanner
@charlesthomas8611
@charlesthomas8611 Жыл бұрын
I need to develop ionic 6 app ficial recognition
@dplaybass096
@dplaybass096 Жыл бұрын
I'm working on vue and ionic, and today your solution was the best i found. U're the fucking god.
@galaxies_dev
@galaxies_dev Жыл бұрын
Thank you 🤙
@alejandroruiz6078
@alejandroruiz6078 3 жыл бұрын
Hi Simon, a query, this code is used to read PDF417 code?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
I'm not sure about the different formats, you might have to check out the documentation to see if that's possible!
@sebasA
@sebasA 3 жыл бұрын
Hello, everithing works fine but when the camera closes the capacitor logo shows up for a second. Is this normal? and how can I avoid it.
@javiersanchez4549
@javiersanchez4549 3 жыл бұрын
Hi there! I'm Using Ionic Vue. Is this approach the same? Thanks!!
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Yes I think it should be quite similar :)
@vNYCblade
@vNYCblade 3 жыл бұрын
heres a tip... lock the orientation and turn off auto rotate...
@adedreey
@adedreey 3 жыл бұрын
Thank you Simon. Just a question tho, how can we import this correctly in capacitor v3
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Some plugins don't work yet with Capacitor 3 so perhaps this is one of them :/
@DheerajSharma-kt6df
@DheerajSharma-kt6df 3 жыл бұрын
Cordova vs capacitor. From both of them which one is better ?
@anroswell
@anroswell 3 жыл бұрын
The ionic team recommends capacitor, because all its efforts and new developments are carried out in this technology.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
I'm a bit biased but I only start new apps with Capacitor. I like the approach a lot more, and you are still able to use 99% of Cordova plugins if you need to!
@saketkale8860
@saketkale8860 3 жыл бұрын
Hey simon, i frame is not working on ios i dont want to use inApp brawser, working on android but not in ios its showing white screen please help me how i resolve this issue.
@sankatsiddhartha2649
@sankatsiddhartha2649 3 жыл бұрын
error: package com.dutchconcepts.capacitor.barcodescanner does not exist import com.dutchconcepts.capacitor.barcodescanner.BarcodeScanner; please help me sir
@francobonaviri6914
@francobonaviri6914 3 жыл бұрын
I have the same fkng problem, did you repair it????
@sankatsiddhartha2649
@sankatsiddhartha2649 3 жыл бұрын
Yes i have fixed it.
@sankatsiddhartha2649
@sankatsiddhartha2649 3 жыл бұрын
@@francobonaviri6914 yes
@corprosystems
@corprosystems 2 жыл бұрын
Great video Simon, worked awesome! I have tried a few different scanning apps that perform faster identifying the barcode even from a greater distance and was wondering is there a way to increase the performance of this plugin or do you have to build your app using Xcode to unlock these features?
@galaxies_dev
@galaxies_dev 2 жыл бұрын
Well you can't do much about the plugin itself unless you want to fork it. But yes, inside a mobile app the Capacitor plugin will use the native SDKs which might indeed work faster!
@TheSaceone
@TheSaceone 3 жыл бұрын
Looking at the java implementation I guess the {force: true} is used to always show the alert dialog when permissions arent yet granted. This can be kind of annoying since it will be prompted every single time unless you grant it or press "never ask again". However, in my opinion it wouldnt make any sense avoiding this alert since you really need it in order to use the plugin. So we will need to stick to {force: true}. Otherwise when the user denies the permission, the alert wont be prompted and the user will need to open the app settings, which is a very bad ux in my opinion.
@hellelo.5840
@hellelo.5840 3 жыл бұрын
how do you deal with the lag in ionic UI?? can you please make a video about this subject
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Which lag exactly do you mean?
@hellelo.5840
@hellelo.5840 3 жыл бұрын
@@galaxies_dev I mean the lag in transition between pages, when I click a button I see the whole ripple effect of the button and there is a small duration before transition, I don't notice that when I am testing on PC (Web), but I can notice that on the android device...So I understood this is a performance issue, is there any way to optimize that.
@caydinc
@caydinc 3 жыл бұрын
@@hellelo.5840 Unfortunately a general performance issue for Ionic
@vampirejs758
@vampirejs758 3 жыл бұрын
I know ionic recommends capacitor but is it still relevant to use cordova?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Sure you can still use Cordova, but usually Capacitor brings more benefits and you could still use 99% of Cordova plugins with it!
@cmanship
@cmanship 3 жыл бұрын
Hi i have a problem , when i click on scan button i just see the box and camera is not detected. Need help
@cmanship
@cmanship 3 жыл бұрын
Good it works for me now , i juste add that BarCodeScanner:BarcodeScannerPlugin; in interface PluginRegistry
@lestthatth
@lestthatth 3 жыл бұрын
as always you are the man, thanks a lot for the aport. Do you know how to upload a picture taken from the camera and get saved on FIREBASE? it would be great if you do something like that
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Sure it's no big deal with Firebase Storage, but perhaps I'll have to create a new video around that topic!
@lestthatth
@lestthatth 3 жыл бұрын
@@galaxies_dev that would be a great help
@rajshekharydodamani2221
@rajshekharydodamani2221 3 жыл бұрын
Hello sir, I am using this plugin with ionic-react, I am able to scan qr-code but I am not able to include any ui on the camera view. help?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Probably just a styling issue, try to debug the DOM and see where your elements are hiding!
@tsenguun
@tsenguun 3 жыл бұрын
Hey Simon! Do you have a discord server that we can chat about ionic stuff?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
No not yet :/
@edugramorg8224
@edugramorg8224 3 жыл бұрын
I am big fan of your tutorials .. i am searching for mobile number authentication using firebase for ionic .. like me ..Many users are looking for this ..But not enough documentation is available.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Thanks for the idea. I'll check it out!
@cpasmart8319
@cpasmart8319 3 жыл бұрын
how can i use it on my cordova application
@galaxies_dev
@galaxies_dev 3 жыл бұрын
It's a Capacitor plugin so you can't use it within a Cordova project.
@GosuMania
@GosuMania 3 жыл бұрын
I cant use flashlight when i use barcode scanner why? :(
@joserodriguezgarcia513
@joserodriguezgarcia513 3 жыл бұрын
The big problem with this code is that in the IOS browser you always have to accept camera permissions. On Android or pc browsers, just accepting the camera permissions once is enough. Does anyone have an alternative or solution?
@muhammadumairnawaz9628
@muhammadumairnawaz9628 2 жыл бұрын
this is not working on PWA. please explain me how is it possible
@muhammadumairnawaz9628
@muhammadumairnawaz9628 2 жыл бұрын
on mobile web
@yorch_dev
@yorch_dev 3 жыл бұрын
I followed step by step and it doesn't work for me. After check permissions, the camera never shows up I even used "BarcodeScanner.hideBackground();" from the documentation but the background is always white :(
@galaxies_dev
@galaxies_dev 3 жыл бұрын
That function didn't work well for me as well, I think you need to hide the ion-content as well from CSS. Give that a try!
@mahmoudalaskalany
@mahmoudalaskalany 3 жыл бұрын
i have issue in dark mode enabled on phone the background is black screen can anyone help with that
@danieeLwayne
@danieeLwayne 2 жыл бұрын
the problem is that your body has a dark background const qrScanner: QRScanner = new QRScanner(); const preview = (show: boolean): void => { if (show) { (window.document.querySelector("ion-app") as HTMLElement).classList.add("yourcustomclass"); } else { (window.document.querySelector("ion-app") as HTMLElement).classList.remove("yourcustomclass"); } } #this code add a class to your body add a background: transparent none !important to yourcustomclass;
@mahmoudalaskalany
@mahmoudalaskalany 2 жыл бұрын
@@danieeLwayne thank you will try it and give you feedback
@ryananto7015
@ryananto7015 3 жыл бұрын
Bro, help ionic to printer portable....
@abhisheksah7113
@abhisheksah7113 Жыл бұрын
barcode its should not while scanning taken and give me any example
@anolghosh9501
@anolghosh9501 2 жыл бұрын
how the hell you made that box
@galaxies_dev
@galaxies_dev 2 жыл бұрын
That's all just CSS overlay!
@drac8854
@drac8854 3 жыл бұрын
Hi, So i have a request to make Can you make a tutorial on how to use camera in web and then later on add this functionality to android as well And if its possible dont start with capacitor, maybe you can add capacitor to an existing ionic react project Is it possible to make ? I just wanted to check if its possible or not ? Fun fact i haven't really use ionic and capacitor I am just going to start android app development and i was looking for alternative of react native (just for knowledge) and i found ionic and capacitor And to be honest it interests me a lot Like for past few days i have been watching many many videos on ionic but all of them end up being and android/ios app So i was wondering if it is possible to add camera plugin (and others) in web And want to know that how much code needs to be changed to make camera work on Android Thats all. Thanks 😊.
@galaxies_dev
@galaxies_dev 3 жыл бұрын
I haven't worked with React but the Capacitor camera works great for both web and Android, with exactly the same code (and iOS as well ofc)! You can find a React tutorial here: ionicframework.com/docs/react/your-first-app/2-taking-photos
@giorgixutiashvili4834
@giorgixutiashvili4834 Жыл бұрын
trust you that it will work? lmao what the hell man 18:24
@RyanDanu-rx6gb
@RyanDanu-rx6gb Жыл бұрын
this is Deprecated
@toxaq
@toxaq 3 жыл бұрын
"I have no code completion today" Repeated everyday... why always VSCode?
@galaxies_dev
@galaxies_dev 3 жыл бұрын
Basically every video.. But usually only for some of the imports..
@jingguoca
@jingguoca 3 жыл бұрын
👍👍👍
@dileepvarma433
@dileepvarma433 3 ай бұрын
toooooooooo........ boring explaination.............😩😩😩😩
@pablojimenez1025
@pablojimenez1025 2 жыл бұрын
Ya no funciona para versión de ionic 6, @dutchconcepts/capacitor-barcode-scanner esta DEPRECATED, y mw sale un mensaje de error intentando con @capacitor-community/barcode-scanner: discoverCaptureDevices deprecated, me puedes ayudar por favor
How to Force Update Ionic Apps
22:32
Simon Grimm
Рет қаралды 25 М.
How to use SQLite in Ionic with Capacitor
15:17
Simon Grimm
Рет қаралды 20 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
What if all the world's biggest problems have the same solution?
24:52
How to Build a PWA QR Code Scanner with Ionic for iOS & Android
25:37
JavaScript USB Barcode Scanning
9:13
BasselTech
Рет қаралды 39 М.
How to add Google Sign In using Capacitor to your Ionic App
24:29
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН