Howdy,
I spent some time this morning making a postprocessing script that one can use with megapixels to process and use qr codes with little to no effort for the user.
I recognize that megapixels does detect qr codes, but it doesn’t seem to be able to do anything with them. The copy to clipboard never works for me.
How to use it?
- Install the postprocess script (see below)
- Open up megapixels and point your phone at a qr code.
- If a QR code is detected a blue box will appear around the qr code (this is via megapixel’s own processing not this script)
- Take a picture of the qr code with that blue box around it. (bottom middle circular button)
- Wait for the picture to be processed(You’ll see a spinning thing in the bottom left). This may take a few seconds
- A dialog box should pop up saying a qr code was found in the provided image. Depending on the qr code, it will ask if you want to see the contents or perform an action based on the contents.
NOTE: if you say yes to performing an action related to the qr code, it will delete the image, as presumably it’s not needed anymore. If you guys disagree with this functionality let me know.
I’m a bit surprised that I couldn’t find an instance of someone else doing this as it was trivially easy to write. Here’s installation instructions and the code:
In theory this should work on both the pinephone and the librem 5. I’ve only tested it on the librem 5.
Edit: some things to note:
- The qr code libraries don’t seem to recognize frame qr or micro qr codes, so those won’t work.
- If the code can be read but not understood, it will just open the text editor and show you the text of the qr code.
- I haven’t figured out a way to launch chatty saying “Hey try to start a sms conversation with this phone number”. So it just opens up sms qr codes in the text editor sadly… Same thing with wifi qr codes.
- Please feel free to contribute to or suggest improvements. They are appreciated!
Note, if there’s a better way that everyone’s been using, please do let me know.