Please help with the creation of a macro (music with bluetooth)

gandalf7503

New member
Hello,

I am currently using a macro that sets the volume to zero on arrival in the home area (via cell towers and geofences).

Now I want to create a music macro that turns on Bluetooth when a music player is started and sets the volumes (media/music and bluetooth voice) to 100% each and keeps this as long as music is playing.

The problem is that the volumes are regularly set to zero (when checking the cell towers and geofences).

Is there a way to circumvent or prevent this?

Technical data:
Huawei P30 lite, not rooted or ADB
Android version: 10
Macrodroid v5.14.1 Pro

Thank you very much for the help.

Kind regards.

Stefan


Translated with www.DeepL.com/Translator (free version)
 

Pseudocyclic

Well-known member
It could be caused by your phone momentarily loosing its cell connection.

Can you post a screenshot of the macro?
 

FrameXX

Well-known member
You could make use of some global variable. Name global variable as you want and then when trigger for music macro triggers and volume goes up to 100% also use set variable action and set this variable true. When music stops set this variable again to false. Now for cell tower and geofences triggers add constraint to work only if this variable is false meaning to work only if your music macro is not active. Does this makes sense?
 

gandalf7503

New member
It could be caused by your phone momentarily loosing its cell connection.

Can you post a screenshot of the macro?
This is my macro. I hope you can do something with it?

You could make use of some global variable. Name global variable as you want and then when trigger for music macro triggers and volume goes up to 100% also use set variable action and set this variable true. When music stops set this variable again to false. Now for cell tower and geofences triggers add constraint to work only if this variable is false meaning to work only if your music macro is not active. Does this makes sense?

Unfortunately, I have no idea how to set the variables. So far I have not used any variables. Could you please help me with the setting, taking into account my macro?

Thanks in advance.
 

Attachments

  • 2. Actions.jpg
    2. Actions.jpg
    172.2 KB · Views: 11
  • 3. Constraints.jpg
    3. Constraints.jpg
    53.6 KB · Views: 11
  • 1. Trigger.jpg
    1. Trigger.jpg
    185.5 KB · Views: 11

420

Active member
it's a bit of an overkill to use 4 of the same "trigger fired" constraints, especially since your macro only has 1 trigger... so you don't really need any "if trigger fired" constraints, i would remove all of them including the loop and the general constraint.

to fix your issue can't you just add a "music not playing" constraint to the "set volume to 0%" action in your cell tower/geofence macro?
 

FrameXX

Well-known member
This is my macro. I hope you can do something with it?



Unfortunately, I have no idea how to set the variables. So far I have not used any variables. Could you please help me with the setting, taking into account my macro?

Thanks in advance.

Also note that there's option in top menu to share macro as a image which will capture full macro and you don't need to make any screenshots.
 

gandalf7503

New member
it's a bit of an overkill to use 4 of the same "trigger fired" constraints, especially since your macro only has 1 trigger... so you don't really need any "if trigger fired" constraints, i would remove all of them including the loop and the general constraint.

to fix your issue can't you just add a "music not playing" constraint to the "set volume to 0%" action in your cell tower/geofence macro?
I have shortened the macro and I think it works. Thank you very much for the help.
 
Top