Hi all, I am new to the forum but I use MacroDroid since long ago. I have found a way to call macros using Google Assistant and wanted to share it with you. I use what NativeAlien described in the last message together with a "Application Launched: MacroDroid" trigger. It can be any app since Google Assistant is able to launch any app in any language as far as I could test. Then when I say "Ok Google, open MacroDroid", MacroDroid is oppened, the trigger is fired, then comes those actions: 1. "Wait 3 seconds", 2. "Speak Text: ready", 3. "Voice Input: temp", 4. "If temp = disable voice input", 5. "Disable Macro: This Macro", 6. "Cancel Macro Actions: This Macro", 7. "End If", 8. "Press Back Button", 9. "Clear Variables: voiceInput", 10. "Set Variable: voiceInput: {lv:temp}". Here are some explanations for some of these actions:
1. the 3 wait is required so Google Assistant finishes speaking before "Voice Input" action starts.
2. the "ready" speak is just for me to know when the 3 seconds wait has finished.
3. I use a temp local variable so I can change it inside this macro for other actions. Anyone could use the glocal voiceInput variable instead througout the macro.
4 to 7 disable this macro to prevent the "Press Back Button" action so I can use MacroDroid. I can also click on the disable Macrodroid switch in the top right corner and re-enable MacroDroid when I finish configuring it.
8 this is required so MacroDroid's window does not interfere with other apps.
9 and 10 force "MacroDroid Variable Change" trigger to be fired even when I speak the same text again.
All that works wonderfully for me, the only two annoying things are the 3 seconds wait and the fact that MacroDroid's Voice Input only works with the system language. My mother tongle is Brazilian Portuguese but I usually set my smartphone and notebook to use English (long history), now I have to set it to Brazilian Portuguese to use my macro. I know it is possible to select language in "Speak Text" action. Could MacroDroid's developers add something like that for the "Voice Input" action?
PS: really nice catch from NativeAlien. Thanks for the idea.