Using Camera methods in BarCodeScanner

Hey there,

I’m having the same problem than the one mentioned here: Difference between Camera and BarcodeScanner?.
I’m trying to use Camera methods with BarCodeScanner (Doc says it’s possible) but the app crashes when I try to use takePictureAsync. I’ve made a snack that shows what I’m trying to accomplish:
BarCodeScanner taking picture - Snack

I didn’t want to use the Camera component because I only need it for scanning codes and saving them, so it would be much simpler to just use the one above.
What am I doing wrong?

Thank you in advance.

cc: @aalices

Hello @afortunato sorry for this, we needed to make some changes to BarCodeScanner so it is a separate component from Camera for a time being and we did not update the docs :disappointed_relieved: however, we’re going to make it work again. But using Camera is not an overkill so feel free to use it. Once, we make the Scanner to have Camera’s methods available again it would just be Camera component but with some additional stuff.

1 Like

OK, good to know!
Thank you for your response :smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.