Image Injection to Real/Simulator iOS Device?

Hi ,

Can we inject image to the Real/Simulator IOS Devices Camera through java code?

I am trying to scan QR code through my App which opens the Device camera to scan the QR code and i want to send the Image of the QR code to the camera feed and get it scanned.

Take a look at the Zxing library. You’ll find the link to source code in this link, which also gives more detail on how to code it:

@wreed thanks for the link, I dont want to read the bar code, i just want to send the QR code image to the camera session that is searching for the QR code so that i do not have to point the Physical QR code in front of Camera of my device. Can we do that with the Zxing library?

Here is a tutorial on using zxing library to scan qr code with camera or from a local file on the device. Unfortunately, tutorial does not specify OS and I have not tried this but hopefully it will help:

Any update on automating QR code scanning using Appium in Real devices?

PS: I am able to automate QR code scanning in desktop Chrome using ChromeOptions but same approach not working for Android Chrome.

Any help would be much appreciated!

@smrtyviks did you get an answer to this scenario?

No, i did not get any solution to this problem.

1 Like

Hello @smrtyviks
Did you or anyone get the solution for this? barcode scanning?