termux-widget
termux-widget copied to clipboard
Receive data shared from other applications
My idea is to share data from other applications with scripts/programs via Termux:Widget (i believe). For example: I receive a text message from a computer system with a code. I wold like to generate a QR code with that code and some other piece of text in it. Normally this would require writing whole Android. With Termux:Widget acting as an interface it could be handled with something as simple as:
#!/bin/bash
sed -ne 's/.*your code is: \([0-9]\{6\}\).*/\1@2137/p' | qrencode -t UTF8
Ofc, if the result cannot be presented in a terminal window termux-open can be used to pass it to another Android application.