User input to stop an action

Hi, I've a look on the macrodroid wiki, but can't really find anything that helps.

I'm using macrodroid to play a specific sound (the action) for a specific messaging notification (the trigger). I'm using different tunes as the sound and they can play for a few minutes (the problem, which I'd like to silence the tune, once I'm aware of it).

Is there a way to stop the action (stop the tune) after it's been triggered, by user input?

I found a post on reddit saying that it could be done using a constraint using on "macrodroid specific -> trigger fired" anded with a "macrodroid specific -> floating button" (user input, I'm assuming). I've tried this combination of constrains as constraints of the macro (underneath and apart from actions) and constraints as part of the action, with little success.

Any information from anybody who's done this or anyone that understands how constraints work better than I do, would be greatly appreciated.

Thanks.
 

AkashiDom

Active member
You meant like if user hate the music(for some reason) and want to stop it, they can do it? I got one

Brb
 

Qarboz

Well-known member
Hi, I've a look on the macrodroid wiki, but can't really find anything that helps.

I'm using macrodroid to play a specific sound (the action) for a specific messaging notification (the trigger). I'm using different tunes as the sound and they can play for a few minutes (the problem, which I'd like to silence the tune, once I'm aware of it).

Is there a way to stop the action (stop the tune) after it's been triggered, by user input?

I found a post on reddit saying that it could be done using a constraint using on "macrodroid specific -> trigger fired" anded with a "macrodroid specific -> floating button" (user input, I'm assuming). I've tried this combination of constrains as constraints of the macro (underneath and apart from actions) and constraints as part of the action, with little success.

Any information from anybody who's done this or anyone that understands how constraints work better than I do, would be greatly appreciated.

Thanks.
You could use the "Notification Cleared" trigger and the "Media Stop" action, to try
 
Hi, thank you for your quick reply, this seems to have worked exactly how I wanted.

Do you mind me asking why you have "empty actions" at the start and end of the action block? Also, why have you included "Music/Sound playing(stopped)" in the triggers? Won't that happen by default (as in, if you don't include this, the music comes to an end and stops, it doesn't play again)?

Once more thanks!:)
 

AkashiDom

Active member
Hi, thank you for your quick reply, this seems to have worked exactly how I wanted.

Do you mind me asking why you have "empty actions" at the start and end of the action block? Also, why have you included "Music/Sound playing(stopped)" in the triggers? Won't that happen by default (as in, if you don't include this, the music comes to an end and stops, it doesn't play again)?

Once more thanks!:)
For the first question, that action means your “other actions”
For second question, I did that Incase if it bugged. I don't know if it can be bugged or not but it for safety.

What I meant by bug is that, lets say the music is playing. Then music stopped(reached end). From my perspective, I think that the macro still running and waiting for user input. So I added that trigger to make it stop waiting.
Why? Incase if you have other macro that playing music then user input of that waiting stuff comes in, the music on other macro will be stopped(from my perspective, idk if it real).
 

Dm114

Well-known member
For the first question, that action means your “other actions”
For second question, I did that Incase if it bugged. I don't know if it can be bugged or not but it for safety.

What I meant by bug is that, lets say the music is playing. Then music stopped(reached end). From my perspective, I think that the macro still running and waiting for user input. So I added that trigger to make it stop waiting.
Why? Incase if you have other macro that playing music then user input of that waiting stuff comes in, the music on other macro will be stopped(from my perspective, idk if it real).
Sorry but I don't understand why you leave an Empty action in the last line unless you would like, for test purpose, to add actions above this line or write a comment.

Empty action, as it says, is "empty" and doesn't do anything and process immediately skips to next action if any. So, whether it is present or not doesn't change anything in the macro process...
 

AkashiDom

Active member
Sorry but I don't understand why you leave an Empty action in the last line unless you would like, for test purpose, to add actions above this line or write a comment.

Empty action, as it says, is "empty" and doesn't do anything and process immediately skips to next action if any. So, whether it is present or not doesn't change anything in the macro process...
Append means put stuff in last/back
The empty action append represent if there another action will happen after disabling the sound
As I said, represent.
 
Top