I've followed Holger's excellent tutorial on decoding a QR code, using an anonymous callback method to retrieve the result string. This works perfectly on a single QR code.
My app has a folder containing hundreds of QR code jpg images which I need to scan through and decode. How do I keep track of which file corresponds to which returned string when the callbacks are asynchronous?
I was hoping there might be a way to pass the filename as a parameter to the callback routine so it could return it as well as the result string, but the compiler doesn't like that.
I could try waiting for each async call to return before processing the next image file using a semaphore like system, but that feels inefficient and clunky.
Please let me know how I should approach this problem.