Buttons sequence

Patrick_b

New member
Hi, I would like to create a simple sequence to turn on/off notifications and WiFi with the pression of volume buttons. I tried but It doesn't work correctly, the macro activates also with just one button pression. I rode that there's the possibility to create a variable to avoid it, but It's to complicate for me.

I posted the macro I created. I'll appreciate if someone can help me
 

Attachments

  • Suoneria_+_WiFi_.macro
    6.1 KB · Views: 6

JA-Translator

Moderator
Hi, I would like to create a simple sequence to turn on/off notifications and WiFi with the pression of volume buttons.

Let me confirm what you'd like to do.
As you mentioned above,
Is that what you'd like to do?

turn on/off notifications and WiFi

Because I wasn't sure what you want to do in your macro.
 

Patrick_b

New member
Let me confirm what you'd like to do.
As you mentioned above,
Is that what you'd like to do?

turn on/off notifications and WiFi

Because I wasn't sure what you want to do in your macro.
Yes. For example I want to create a sequence for activate a macro (for example volume up, then volume down to turn off notifications volume and WiFi and the contrary). Also for others macros maybe
 

ARME

Active member
Yes. For example I want to create a sequence for activate a macro (for example volume up, then volume down to turn off notifications volume and WiFi and the contrary). Also for others macros maybe
I don't know if I got it right, but with this one if you mash volume up you turn wifi on and it puts the notification volume to 50%; if you mash volume down you turn wifi and notification volume off. If the notification volume doesn't change, when you configure the action, in the upper left corner mash the box. If it all works tell JA-Translator that the problem is solved at least he doesn't waste time trying to help you unnecessarily.
PS: mashing the volume buttons doesn't change the volume of the apps' normal music/audio
 

Attachments

  • Patrick_B.macro
    3.7 KB · Views: 4
Last edited by a moderator:

Patrick_b

New member
I don't know if I got it right, but with this one if you mash volume up you turn wifi on and it puts the notification volume to 50%; if you mash volume down you turn wifi and notification volume off. If the notification volume doesn't change, when you configure the action, in the upper left corner mash the box. If it all works tell JA-Translator that the problem is solved at least he doesn't waste time trying to help you unnecessarily.
PS: mashing the volume buttons doesn't change the volume of the apps' normal music/audio
Yes, but I would like to create a sequence: es. First Volume Up and then Volume Down to turn off volume and WiFi, and volume down than volume up to activate them. With only one trigger (volume up OR down) the macro can be activate when I want to simply change the volume level.
I don't know if I explained well
 

JA-Translator

Moderator
@ARME Thank you for trying to clarify his purpose.


@Patrick_b
Now I understand what you'd like to do.
It'd be more complicated with the constraint of pressing the buttons consecutively, so how about "long-press"?
If yes, then that's going to be quite easy to create a macro.

Here is the simple macro.
In the macro, You need to edit the Notification action as you want becase I am not sure how you'd like to change the notification.
 

Attachments

  • Suoneria_+_WiFi_2.macro
    6 KB · Views: 3

JA-Translator

Moderator
Here is one more macro.

I added local variables to set the constraint.

When you press the UP and Down buttons consecutively within 5 seconds,
the macro runs.

Screenshot_20230621-004843_MacroDroid.png

Screenshot_20230621-003934_MacroDroid.png
 

Attachments

  • Suoneria_+_WiFi_3.macro
    14.7 KB · Views: 3

Patrick_b

New member
Strictly speaking,
Actually, even when you press the Down-and-Down buttons (twice), you can run the macro.
vice versa.
Up-and-Up buttons can work as well.
Okok thanks. I tried both but the 3rd, I don't know why, works also pressing once
I prefer the Volume triggers that allow to update volume, for use them also when I'm playing music or videos.
I asked for that, but I don't want to disturb a lot, I will modify the macro to works only when music is not running, and there not will be problems.

PS. Yesterday I tried to create a variable and I thought of use it to create a macro and set that when Volume count is = 2 to turn on/off notifications and WiFi, but maybe it's a way to complicated that I imagined
 

Attachments

  • Variable_.macro
    4.9 KB · Views: 2
Last edited:

ARME

Active member
Okok thanks. I tried both but the 3rd, I don't know why, works also pressing once
I prefer the Volume triggers that allow to update volume, for use them also when I'm playing music or videos.
I asked for that, but I don't want to disturb a lot, I will modify the macro to works only when music is not running, and there not will be problems.

PS. Yesterday I tried to create a variable and I thought of use it to create a macro and set that when Volume count is = 2 to turn on/off notifications and WiFi, but maybe it's a way to complicated that I imagined
If it's possibile to do what you want, It's probably too complicated. Grant permissions with ADB and use the trigger volume button long Press, as suggested by JA-Translator. With this trigger it's super Easy and since in your First attached macro you added as constraint "screen locked" It won't mess up with other apps and when you listen to music you probably don't long Press the volume button because It Will blast the volume up/down too fast.
To Grant permissions with ADB download Shizuku from the playstore and follow its guide. Then download aSHELL fron F-Droid on Google. Open this app and follow its instruction, then you can paste the commandos in the Shell. Anyway there Is a guide in this forum. Using shizuku with wireless debugging you don't even need a PC.
 

Patrick_b

New member
If it's possibile to do what you want, It's probably too complicated. Grant permissions with ADB and use the trigger volume button long Press, as suggested by JA-Translator. With this trigger it's super Easy and since in your First attached macro you added as constraint "screen locked" It won't mess up with other apps and when you listen to music you probably don't long Press the volume button because It Will blast the volume up/down too fast.
To Grant permissions with ADB download Shizuku from the playstore and follow its guide. Then download aSHELL fron F-Droid on Google. Open this app and follow its instruction, then you can paste the commandos in the Shell. Anyway there Is a guide in this forum. Using shizuku with wireless debugging you don't even need a PC.
Perfect, thanks!
Yes, I have already done the ADB for enable/disable position. The last question: what's the difference between those two?
 

Attachments

  • Screenshot_20230620-214519_MacroDroid~2.png
    Screenshot_20230620-214519_MacroDroid~2.png
    91.5 KB · Views: 9

ARME

Active member
The second is a normal press (so u change the volume of 1 bit up or down). Long press is when u hold it for a few seconds
 

Endercraft

Moderator (& bug finder :D)
The second is a normal press (so u change the volume of 1 bit up or down). Long press is when u hold it for a few seconds
The second does support long press, but usés accessibility services instead - I recommend using this trigger instead.
 
Top