Receive data shared from other applications
steelman opened this issue · 2 comments
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.
Your description is not clear for your flow.
If you want to share text something with other apps, use https://wiki.termux.com/wiki/Termux-share
To receive file or urls from other apps, check https://wiki.termux.com/wiki/Intents_and_Hooks
Thank you. That is sufficiently close to what I need.