0

I'm trying to make a QR scanner using a xamarin project in visual studio 2017 and the ZXing.Net.Mobile package, but the video in the Android emulator is large and pixelated. Here is a pic of what I'm seeing.

What would be the reason for seeing this pixelation? It doesn't appear to be the camera output. There is also video jitter like the camera is moving while the app is running.

Any help would be greatly appreciated.

Grebic
  • 13
  • 6
  • You cannot debug this on an emulator, an emulator does not have a camera! – FreakyAli Feb 26 '19 at 07:00
  • @G.hakim Depending upon which webcam you have.... (on macOS, the built-in iSight works very well...) – SushiHangover Feb 26 '19 at 17:09
  • @SushiHangover So the emulator can connect to a webcam? – FreakyAli Feb 26 '19 at 19:29
  • @G.hakim Yes, do it all the time : https://stackoverflow.com/a/30792615/4984832 – SushiHangover Feb 26 '19 at 19:33
  • @SushiHangover I have been playing around with the settings in the Android Device Manager and I tried switching the cameras to Webcam0. It made the large pixelated image go away, but I am left with a black screen and what appears to be a red scanning line in the middle. It seems as though it still cannot access the camera for some reason. – Grebic Feb 26 '19 at 22:22
  • @SushiHangover Great man thanks, i guess ios simulators cannot do this? – FreakyAli Feb 27 '19 at 05:28
  • @G.hakim No, Apple has not enable a way to do this. It has been user requested via their dev forum for 10 years since iSight support is built-in to OSX/macOS and ignored with no official policy statement (even though some of the ex-Apple devs have stated they seen it working in in-house development prototypes) – SushiHangover Feb 27 '19 at 05:35
  • @SushiHangover Yes i knew that it did not work for iOS and assumed it must be the same for android – FreakyAli Feb 27 '19 at 06:06

1 Answers1

0

Turns out that it was just the test screen the emulator was displaying. The emulator didn't want to access the camera on that particular computer. I just ended up connecting a phone to the computer and testing it on that. Took a little while to work out the code, but now it works great. For me it seems like just testing it on a phone is a much better option if you are able to do so.

Grebic
  • 13
  • 6