by P. Andreas Schmidt, IVE
Version 1 (April 18, 2024)
Download (64 downloads)
For those looking for a way (this is just the first I found in the internet) to decode/decipher/read QR codes from images (generated or taken with camera or screenshot, meaning even if there's more than just the code on it!) here's a simple example to show. It's actually just one block (the decoding), but there's the setup, which this flow does not for you, nor will I explain all the steps in detail, seeing how there's enough of that on the internet.
It uses the Termux terminal app, as well as the accompanying Tasker plugin for it, which you can get from F-Droid or GitHub. Follow their instructions on setting up the plug-in and AM (grant access to files, special permission to run commands, making directories in Termux, etc).
You then only need to install the "zbar" package/library by running "pkg i zbar" (ideally you should - always - first update/upgrade the "system": e.g 'pkg upgrade -y').
After that this flow will work. It uses the stdin option of the plug-in to run the command, so no need to create any scripts. It uses the command line arguments to get only the content of the QR code, you're free to check out the options and adapt to your needs.
There are 3 starting points, only pick one at a time, obviously. Each has another way of getting a file with a QR code, then they run the command and show the result and delete the file again. I haven't tried, but my guess is that Termux will have access only to certain folders (those that show, as a matter of fact), so be careful where you put those files, in order for them to be reachable for the command.
As stated, it will also work when there's more on the image to be seen than just the QR code (the rest of the webpage etc).
It's very fast. It's free. No root or ADB or premium needed.