Add BT closing action

Papy_Rafale

Member
Hello,



I started today on Macrodroid.

I just created a macro:

- Trigger / Application launched
- Action / Connect an audio device by BT

So far everything is fine, now I would like that by closing my application (trigger) my BT is cut off, and there I cannot find the solution.

This macro is to launch the Media Center (DACIA) of my car, which I made work very well but for the part of stopping the BT by closing the application I really do not know how to do it, can you help me ?
 
Last edited:

Dm114

Well-known member
Bonjour,

Je commence depuis aujourd'hui sur Macrodroid.
je viens de créer une macro :
- Déclencheur / Application lancée
- Action / Connecter un périphérique audio par BT

Jusque là tout va bien, maintenant je voudrais qu'en fermant mon application (déclencheur) mon BT se coupe, et là je ne trouve pas la solution.

This macro, c'est pour lancer le Média Center (DACIA) de ma voiture, ce que j'ai fais très bien fonctionner mais pour la partie arrêt du BT en fermant l'application je ne sais vraiment pas comment faire, pouvez-vous m'aider ?

Merxi d'avance.
As a trigger you could use 'App closed' but be aware that an app is considered to be closed when it goes from foreground to background (and again 'launched' when it comes back to foreground). Then use 'BT disable' action.
 

Dm114

Well-known member
Please be kind enough to write in English (or use a translator) for every MD user to benefit answers about your questions.
 

Papy_Rafale

Member
Hello,
So excuse me, I will write in English now.
Thanks for your help, now it's working, but I had to do two macros for that, the first for starting and the second for shutting down, I would have liked to have made only one, so I have to search a bit more.
 

Jacob L

Moderator (Lawsonator)
Please be kind enough to write in English (or use a translator) for every MD user to benefit answers about your questions.
This upsets me a bit, how long does it take for us to translate really
 

Papy_Rafale

Member
Hello,
So excuse me, I will write in English now.
Thanks for your help, now it's working, but I had to do two macros for that, the first for starting and the second for shutting down, I would have liked to have made only one, so I have to search a bit more.
I don't know why, but I had already written in English, is that ok now?
 
Last edited:

420

Active member
Hello,
So excuse me, I will write in English now.
Thanks for your help, now it's working, but I had to do two macros for that, the first for starting and the second for shutting down, I would have liked to have made only one, so I have to search a bit more.
I don't know why, but I had already written in English, is that ok now?
You can add multiple triggers to one macro, and use an if clause to check which of the triggers fired and to run the corresponding actions.

So you probably won't need two seperate macro's at all, see the attached example screenshot below;
 

Attachments

  • Screenshot_20211004-210226.png
    Screenshot_20211004-210226.png
    175.2 KB · Views: 7

Dm114

Well-known member
This upsets me a bit, how long does it take for us to translate really
Hi @Jacob L
Don't be upset: my request was for the greatest number of MD users but not for me... I'm French! 😉😀

I'm not the first member to ask people who have questions to write in English. I think it's more logical for them to do this light effort (with or without translator). I'm not sure a Japanese member writing in Japanese would get so many answers... 🤔😉

Take care @Jacob L
 

tanutanu

Well-known member
イチイチつまんない事で噛みつくなって話だよ、ジェイコブ。
トピ主とみんなのためだろ?
今回ばかりは俺はDm114を擁護するゼ!

Just kidding;)
 

tanutanu

Well-known member
It's funny for me. I don't think you guys understand what I wrote in Japanese:ROFLMAO:
Google translator (and also the others) is completely broken, especially for Japanese. Writing in English is much better than the poor translation even though I sometimes made grammatical mistakes and typos.
 

Attachments

  • Screenshot_20211005-104706_copy_1080x1872.png
    Screenshot_20211005-104706_copy_1080x1872.png
    169.7 KB · Views: 5
  • Screenshot_20211005-104410_copy_1080x1751.png
    Screenshot_20211005-104410_copy_1080x1751.png
    162.1 KB · Views: 5
Last edited:

Papy_Rafale

Member
Icône de validation par la communauté
Hello,
I have a new problem with my macro.
Since I do it like 420 model BT does not disconnect anymore, in order for disconnection to be done I have to turn off the phone screen, how can I fix this.
Just for information, my phone is not root yet.
 

tanutanu

Well-known member
My MD log

07-10-21 11:27:43 - Message Flottant 'BT closed' 07-10-21 11:27:41 - Patienter 2 secondes 07-10-21 11:27:41 - Désactiver le Bluetooth 07-10-21 11:27:41 - Sinon Si 07-10-21 11:27:41 - A: Si (Déclencheur activé: Application Lancée: Media Control) did not invoke because constraint failed: Déclencheur activé (MediaControlConnext) 07-10-21 11:27:41 - Si (Déclencheur activé: Application Lancée: Media Control) 07-10-21 11:27:41 - Invoking Macro: MediaControlConnext 07-10-21 11:27:41 - Application Fermée ([Media Control]): Media Control

07-10-21 11:27:43 - Floating Message 'BT closed' 07-10-21 11:27:41 - Wait 2 seconds 07-10-21 11:27:41 - Disable Bluetooth 07-10-21 11:27:41 - Otherwise If 07-10-21 11:27:41 - To: If (Trigger enabled: Application Launched: Media Control) did not invoke because constraint failed: Trigger enabled (MediaControlConnext) 07-10-21 11:27:41 - If (Trigger activated: Application Launched: Media Control) 07-10-21 11:27:41 - Invoking Macro: MediaControlConnext 07-10-21 11:27:41 - Closed Application ([Media Control]): Media Control

As the log, it works correctly. Did you attach the log when you encountered the issue?
I checked the last one. It's very hard to find without additional info.
First, you need to change language settings, and clear entire log, then reproduce the problem. The screenshot is better because it colored.
 

Papy_Rafale

Member
I can't put my macro in English, what should I do?
I searched in the settings, everything is in English but my macros remain in French.
Can you guide me?

Icône de validation par la communauté
 

420

Active member
I can't put my macro in English, what should I do?
I searched in the settings, everything is in English but my macros remain in French.
Can you guide me?

View attachment 1134
I believe this is some sort of bug, if you change the language to french (or any other language) and then right back to english it should be fixed.
 

Dm114

Well-known member
I can't put my macro in English, what should I do?
I searched in the settings, everything is in English but my macros remain in French.
Can you guide me?

View attachment 1134
How can your macros be in French and the rest of MD in English? It's so weird.
On the very bottom line (dark blue line of every MD screen) you have 4 options (from Home/Accueil to Settings/Paramètres, according to the selected language). Select Settings/Paramètres then the bottom line called Select language/Définir la langue. Then select English and everything should turn to English. When you are done, select the first line called System default and select it a 2nd time to have this line ticked (small bug when changing language and going back to system default).
 
Top