How can I receive the broadcast intent from Termux?

tanutanu

Well-known member
Hi,

I'm trying to get the broadcast intent from am command via Termux. However, no trigger fired on MD.
Does anybody tell me how to do? Basically, in another case, it actually fired, but keep silent even though putting out a bunch of variable changing log.

I'm writing the macro as followings:
1. Calling my shell script via TermuxTasker plugin,
2, jq command proceed to extract the file asynchronously till it finish the job because it became super slow if returned to MD.
3. MD want to notify these Progress to user and store each state and timestamp for next execution(compare and work for newer only).
4. So, I need to send the info from Termux to MD. I had tried 4 other options as well:
A. calling plugin one by one - first prototype, it's super slow, over 10 times slower.
B. Transfer the data as notification and detect via MD trigger - it worked but looked very poor(suitable for data processing on MD, not for human).
C. Notify via Tarmux'Tasker-api feature - the performance is very nice but the notification looks cheaper.
D. Batch processing pre/post extract - pretty good performance but nobody can't recognize the progress.

Although the trigger never fired, the receiver variable is changing. It's really mysterious:(
However, this is the first time for me to use so many extra parameters, so I might have misunderstandings🤔
 

Attachments

  • Screenshot_20211018-204735_copy_1080x1872.png
    Screenshot_20211018-204735_copy_1080x1872.png
    210.7 KB · Views: 29
  • Screenshot_20211018-204615_copy_1080x1819.png
    Screenshot_20211018-204615_copy_1080x1819.png
    189.2 KB · Views: 27
  • Screenshot_20211018-213937_copy_1080x1685.png
    Screenshot_20211018-213937_copy_1080x1685.png
    113 KB · Views: 29
  • Screenshot_20211018-214011_copy_1080x1769.png
    Screenshot_20211018-214011_copy_1080x1769.png
    106.7 KB · Views: 22
  • Screenshot_20211018-214051_copy_1080x1569.png
    Screenshot_20211018-214051_copy_1080x1569.png
    92.1 KB · Views: 22
  • Screenshot_20211018-204026_copy_1080x1053.png
    Screenshot_20211018-204026_copy_1080x1053.png
    123.1 KB · Views: 26
  • 20211018_204411_copy_1080x3133.png
    20211018_204411_copy_1080x3133.png
    746.5 KB · Views: 26
  • Wow
Reactions: 420

tanutanu

Well-known member
Hi,

I'm trying to get the broadcast intent from am command via Termux. However, no trigger fired on MD.
Does anybody tell me how to do? Basically, in another case, it actually fired, but keep silent even though putting out a bunch of variable changing log.

I'm writing the macro as followings:
1. Calling my shell script via TermuxTasker plugin,
2, jq command proceed to extract the file asynchronously till it finish the job because it became super slow if returned to MD.
3. MD want to notify these Progress to user and store each state and timestamp for next execution(compare and work for newer only).
4. So, I need to send the info from Termux to MD. I had tried 4 other options as well:
A. calling plugin one by one - first prototype, it's super slow, over 10 times slower.
B. Transfer the data as notification and detect via MD trigger - it worked but looked very poor(suitable for data processing on MD, not for human).
C. Notify via Tarmux'Tasker-api feature - the performance is very nice but the notification looks cheaper.
D. Batch processing pre/post extract - pretty good performance but nobody can't recognize the progress.

Although the trigger never fired, the receiver variable is changing. It's really mysterious:(
However, this is the first time for me to use so many extra parameters, so I might have misunderstandings🤔
I split the macro to 2 parts, for main and for notification receiver sub process while Turmux handling the files.
Yes, It could be working but I still have a question. Doesn't Wait Until action work for recursive use perfectly? On another perl of the macro, the action works very well, but I sometimes encounter similar problems:(
 

Attachments

  • Screenshot_20211019-115143.png
    Screenshot_20211019-115143.png
    407 KB · Views: 15

tanutanu

Well-known member
I split the macro to 2 parts, for main and for notification receiver sub process while Turmux handling the files.
Yes, It could be working but I still have a question. Doesn't Wait Until action work for recursive use perfectly? On another perl of the macro, the action works very well, but I sometimes encounter similar problems:(
OOPS, finally I found rhe reasons why it didn't work. That's my mistake🙃
I sent a parameter double quoted to avoid unexpected escapes but not to return strings. That's why the trigger never fired.
On the other hand, even though not called, variables are still updated. It's interesting behavior and seems to be useful sometimes. Because it means modify local variables without a trigger call. Just existing but never fired trigger might make sense as local variable modifier. Intent is not limited to send/receive to/from another apps, another macros and itself could anytime anywhere.
 
Last edited:

tanutanu

Well-known member
Too much variable and problema of sintax. clean all whit a funny one? usually remember to fix double trigger call.
Exactly, but the problem wasn't caused by the number of triggers. I just forgot the fact that I I sent a double quotes a variable string to Termux. I usually quote it to prevent from "nibble eating" by shell, especially for multibyte characters even though Android standard is UTF8, shell safe.
In this case, I didn't need ti do it:whistle: When I wrote Termux side shell script, I forgot it completely🙃
 
Top