Barcode Scanner - Unable to detect camera

2
I am trying to use my application on my mobile to scan a barcode.  I am using the Barcode Scanner widget.  However, when I click scan, I get an error message saying "Unable to detect camera".  However, I use my camera to scan the QR code to connect to my app.  I also double checked that the Mendix app on my phone has access to my camera.  What am I missing?
asked
3 answers
2

You should be testing with your own hybrid app, like Cillus indicated. Do not forget to inlude the following plugin in the the Custom Phonegap/Cordova configuration, did you do that?

<plugin name="phonegap-plugin-barcodescanner" />

Are you also using ADFS or another authentication method? That might cause trouble. In that case you should follow these instructions: https://docs.mendix.com/howto/mobile/implement-sso-on-a-hybrid-app-with-mendix-and-saml

I have a similar issue (on Android) that's not solved for me yet (ticket 76489). In my case the problem is that after logging in using ADFS, Android keeps two WebView instances active instead of one (see image below). This can be detected using Chrome DevTools (https://docs.mendix.com/howto/mobile/debug-a-mobile-app).

You cannot test your barcode scanning widget with Mendix's testing app called "Mendix Mobile", like Fabian indicated.

answered
0

This widget only works (with your camera) when you have a 'native' App on your phone.

Check:

https://docs.mendix.com/refguide/developing-hybrid-mobile-apps

 

Good luck! :-)

answered
0

Hi,

nothing wrong with your App, but the widget just does not work in the Mendix App, as stated in the widget documentation

This widget enables your mobile app to scan barcodes and QR codes.

Note: this widget does not work in the Mendix Mobile app.

regards

answered