I was ready to do the same for my application (which scann QR code), and the solution I used was to add an EditText (which appears only in test mode) to put a line that matches the QR code and then processing the string as a result of the scan.
The problem with this solution is that you cannot test the camera or the functions / methods that you made for decoding, but this is the only problem, so if you use a library (like ZXing), this is not very important, because I I assume that you only need the line corresponding to the QR code.
source
share