Put the output from a dialog box into a bash variable:
termux-dialog outputs data in json format so we need to parse that. One way is to use jq which needs to be installed: apt install jq -y
Then because we're going to pipe the output into jq we'll need to enclose everything in double quotes before assiging to a variable. This is is a good example:
myvariable="$(termux-dialog -t "Please enter some text" | jq '.text' -r)"
To test this has worked:
echo "$myvariable"
And you should see what you had entered has been assigned to "myvariable"
@khansaad1275
termux-dialog radio -v "case 1, case 2, case 3"
, you can also try usingtermux-dialog -l
to list all available options