How to simulate taking picture and give its input to app?

I have a app in which i need to scan the QR code. Taking the picture from the app is not feasible as i need to run the app in multiple devices at once and it require human help. How can i provide the QR code image/data to the app? Is there any way possible to simulate taking of picture and give store image as input to app?