- If I am on a call, I would like the flow to wait until I am off and then proceed with the flow.
- I would like to save the current volume level, increase to max, and then return to previous volume level.
- I would like this to trigger only once every 10 seconds...this way I do not receive multiple announcements during a rapid-fire SMS session.
- If I am in the stock Messenger program, I do not need the announcement. Is the App Task Running condition the best way to trap this?
SMS Received - Wait, Volume, Duplicate
Moderator: Martin
SMS Received - Wait, Volume, Duplicate
Hi--new to this and thought I would create an incoming SMS announcement. I need assistance adding the following to my flow:
-
- Posts: 6
- Joined: 06 Aug 2015 06:00
Re: SMS Received - Wait, Volume, Duplicate
Consider adding a 30 seconds delay when condition "Call State" is false.jarid wrote:1. If I am on a call, I would like the flow to wait until I am off and then proceed with the flow.
You can store your volume using the action "Store Audio Volumes" and restore using "Restore Audio Volumes".jarid wrote:2. I would like to save the current volume level, increase to max, and then return to previous volume level.
None that I can think of, but maybe you can set the flow execution policy to "Wait until the currently executing instance has finished" and add a 10 second delay to the end of your flow.jarid wrote:3. I would like this to trigger only once every 10 seconds...this way I do not receive multiple announcements during a rapid-fire SMS session.
4. Maybe create 2 additional flows to enable / disable your flow? Use App Task Started / App Task Ended as the triggers.jarid wrote:If I am in the stock Messenger program, I do not need the announcement. Is the App Task Running condition the best way to trap this?
EDIT: Umm... Wrong action in this flow. Should be "Set Flow State: Disable Your Flow", but I think you should get the idea anyway.
Re: SMS Received - Wait, Volume, Duplicate
Thank you.
I incorporated your suggestions and made further modifications to the flow. Everything seems to work.
Any additional suggestions or flow improvements?
I incorporated your suggestions and made further modifications to the flow. Everything seems to work.
Any additional suggestions or flow improvements?
-
- Posts: 6
- Joined: 06 Aug 2015 06:00
Re: SMS Received - Wait, Volume, Duplicate
If it's working then it's probably good to go.
I noticed you opted to store audio volumes before checking for headsets. Since you are not going to change the volume if the headset is currently being used, you may consider to store audio volume right before speech output. Even though your flow will have one more action, it runs slightly more efficiently as it do not have to store / restore volume if headset is plugged in. Also, you have an action that disables the flow. You have another flow that enables this one, right?
I noticed you opted to store audio volumes before checking for headsets. Since you are not going to change the volume if the headset is currently being used, you may consider to store audio volume right before speech output. Even though your flow will have one more action, it runs slightly more efficiently as it do not have to store / restore volume if headset is plugged in. Also, you have an action that disables the flow. You have another flow that enables this one, right?
Re: SMS Received - Wait, Volume, Duplicate
Good catch on the volume set. I moved the flow around and added a variable to track if the volume was stored. This way I trigger the volume restore only if needed.
I do NOT have another flow triggering this flow. I will run some checks, but my belief is after forcing the flow to stop (because SMS is already open or the phone is face down), another received SMS would trigger the flow again (after the 30 second delay). Is this not correct?
I do NOT have another flow triggering this flow. I will run some checks, but my belief is after forcing the flow to stop (because SMS is already open or the phone is face down), another received SMS would trigger the flow again (after the 30 second delay). Is this not correct?
-
- Posts: 6
- Joined: 06 Aug 2015 06:00
Re: SMS Received - Wait, Volume, Duplicate
sparkingspirit wrote:Also, you have an action that disables the flow. You have another flow that enables this one, right?
The "Set Flow State: Disable" action (the one right beside the trigger) disables the flow specified in the action. A disabled flow will never execute until re-enabled.jarid wrote:I do NOT have another flow triggering this flow. I will run some checks, but my belief is after forcing the flow to stop (because SMS is already open or the phone is face down), another received SMS would trigger the flow again (after the 30 second delay). Is this not correct?
The action "Stop Flows" should be used to stop a flow. However, there is no need to stop a flow if it's going to end naturally anyway.
To temporary disable announcement of SMS message when the SMS app is opened, you may create 2 more flows to enable / disable this flow.