When hung up in-call

117 views
Skip to first unread message

Mauro Ghibaudo

unread,
Jan 14, 2021, 5:15:42 AM1/14/21
to Automate
I'm trying to do a flow that waits for an incoming call to restore the ringer, then when that same call is hung up it proceeds; the flow works as expected when the call arrives, but then remains stuck in the "When hung up" block. Is this working as expected? Is here a way to proceed when a call arrives, then again when the same call is hung up?

This simple flow shows the issue: when the call arrives it goes on to block 3, but it doesn't exit it when the call is hung up.

photo_2021-01-14_11-11-53.jpg

Mauro Ghibaudo

unread,
Jan 14, 2021, 7:40:24 AM1/14/21
to Automate
I was able to solve this by using a "Call state?" block instead of "When hung up"; I'm guessing with the latter it doesn't work because the block is waiting an incoming call, but the current one doesn't count as incoming, since it's already ongoing (despite just ringing)? I'll leave this here just to be sure the above flow work as intended and for future reference, but with "Call state?" it seems to work.

Henrik "The Developer" Lindqvist

unread,
Jan 14, 2021, 2:26:01 PM1/14/21
to Automate
As the documentation say:
Note! This block won’t work when used during an ongoing call since it has to detect each preceding state. Use the Call state block for such cases.

m.g...@gmail.com

unread,
Jan 14, 2021, 2:32:51 PM1/14/21
to Automate
I somehow missed that, thanks.

Sergio Manfrin

unread,
Jan 9, 2024, 7:23:28 AM1/9/24
to Automate for Android
But how would it be possible to detect a missed call or a answered call after placed a Call incoming with proced=when ringing?

Henrik "The Developer" Lindqvist

unread,
Jan 9, 2024, 8:34:49 AM1/9/24
to Automate for Android
Using only the Call state block will not suffice, as said, use the Call incoming block.

Andreu Pinel

unread,
Aug 20, 2025, 1:09:27 PMAug 20
to Automate for Android
I don't know if I should start a new topic or if I can use this one, which is kind of similar to my current situation.
My goal is the following: I want that, under some conditions (being at home and having the phone muted), when I receive a phone call my lights start blinking in a given color (blue). If the call gets missed, then the lights should start blinking in a different color (red), but if I answer or reject the call, the lights should stop blinking.
To achieve this, I did the following:
1) I created 4 flows called "Ringing" (the only one that has to be manually started at the beginning), "Missed", "Answered" and "Rejected".
2) When "Ringing" is initiated, the 1st thing it does is stopping the other 3 flows (the reason is explained later on at point 5) and then waits for an incoming ringing call.
3) Once this ringing state is detected - and if all the conditions are met - it triggers the blue blinking lights. If the conditions are not met the flow goes back to the "when ringing in-call" block
4) And finally, before ending the flow, it starts the other 3: "Missed", "Answered" and "Rejected"
=> Everything works fine up to this point. The "Ringing" flow is terminated, the other 3 are running, and the lights are blinking in blue.
5) The 3 new flows are practically identical to each other: They wait for an "When xxxxx in-call" (where xxxxx is either "missed", "answered" or "hung up"), then they should either trigger the new lights blinking in red (in the "Missed" flow) or turn off the lights (in the "Answered" and "Rejected" flows), and last but not least, they should initiate again the "Ringing" flow. The idea is that no matter which of these 3 flows captures the "When xxxxx in-call", by starting again the "Ringing" flow as last action, the other two will also be terminated (refer to point 2).

And it's at this point where I have my problem, because it does "not" work (or not as I would like). I'll try to make myself clear. If I eliminate the "Answered" and "Rejected" flows from the whole equation, the "Missed" one then works as expected (the lights blink in red and the "Missed" flow ends after calling the "Ringing" one again, which awaits for another ringing in-call). But I have the impression that if I launch 3 different flows in parallel, each one with a "When xxxxx in-call", only one of the 3 blocks/flows - probably the last one to be called - is really able to capture the in-call thread. Can this be confirmed? Any suggestion - even a completely different approach - will be more than welcome.

PS: I gave a look to the "call state?" block, but I think - I may be wrong - it's not useful for what I need.
PS: In case someone wonders how I do the lights thing, I use the "send broadcast" block to communicate with another app (Hue Essentials), which is the one that really triggers the corresponding scene or turns off the lights.
Reply all
Reply to author
Forward
0 new messages