Hello there!
I have a query. It is as follows:-
I have two flows, Flow 1 and Flow 2. Initially, Flow 1 is set to flow state On and Flow 2 to Off.
Flow 1 gets triggered as soon as an incoming call arrives and after the execution of certain conditions and actions, Flow 2 is set to flow state on. Now the trigger that Flow 2 uses is the incoming call getting off-hook, based on which Flow 2 is supposed to carry out certain actions and finally, it is supposed to set itself to flow state off.
Now my query is that since Flow 1 was On during the arrival of the incoming call, therefore it knows that a call has arrived and is in progress but since Flow 2 was Off at the moment of the arrival of the incoming call, it seems not to know that an incoming call is already in progress and therefore doesn't respond to its trigger of incoming call getting off-hook.
Kindly respond to my query.
Thanks
Akhilesh
Query regarding incoming call trigger.
Moderator: Martin
Re: Query regarding incoming call trigger.
I think your problem is that you're mistaken what "off-hook" means. Ringing is when you're receiving a call, off-hook is when you answer it and the actual line opens. It is not possible to detect when participant closes the line, only when you do it(call ended).
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: Query regarding incoming call trigger.
No, MURTUMA! I completely understand what off-hook means. In order for you to further understand my problem, I'd request you to kindly see the attached flow.
Thanks
Akhilesh
Thanks
Akhilesh
- Attachments
-
- GroupFlashlightOnIncomingCallsOnlyWhenPhoneOrientationFaceDown&TillPhoneRings(New).xml
- (7.25 KiB) Downloaded 696 times
Re: Query regarding incoming call trigger.
Yes, it seems so. I misunderstood you.akhileshg1988 wrote:No, MURTUMA! I completely understand what off-hook means.
It does not work because triggers detect only EVENTS as opposed to STATES. In other words, incoming trigger detects when the phone enters in off-hook state, but it can't poll phone's current state. Conditions are for detecting what state some setting is in. This is intended behaviour for performance reasons. Bushmills explained this nicely in another topic: http://automagic4android.com/forum/view ... 934#p14934
You seem to be familiar with making loops. You could create similar loop with condition Call State to poll the off-hook state. For example, run flow with action Execute Flow to run the loop. False path follows when the call is not yet in off-hook. True path follows the opposite. I also suggest to add a short pause of 100-1000ms with action Sleep to ease up system resource requirements.