Help with receiving intents

moonshine

New member
Hi,

I've searched the web but couldn't find an example of how to properly use intent as a trigger.
I've got an external application that is able to send custom intents (activity or broadcast) and I would like to create a trigger in Macrodroid to act on such intent received.

I've tried many things but nothing worked. In external app I have to specify the following:
Type (activity or broadcast)
Action
Flags
Component name
Extras

Could anyone help me what am I supposed to use to receive it in Macrodroid?

As a workaround I'm sending the following intent to start the macro in Macrodroid but doing this way I'm unable to specify additional parameters (extras) which I would use in my macro as variables.


Type: Activity
Action: android.intent.action.ShortcutDispatch
Flags: ACTIVITY_CLEAR_TASK | ACTIVITY_CLEAR_TOP | ACTIVITY_NEW_TASK
Component name: com.arlosoft.macrodroid/com.arlosoft.macrodroid.ShortcutDispatchActivity
Extras: com.arlosoft.macrodroid.MACRO_NAME = name of my macro


I will appreciate any help.

Thank you!
 
Last edited:

Endercraft

Moderator (& bug finder :D)
For type, select broadcast. For action,use anything you'd like (for example macrodroid.intent.action.MACRO) where MACRO is the macro name (you will then be able to use that in the intent received trigger), flags should be left to a value of 0,component name empty.
Extras are a bit tricky because you have to make sure that they match in the trigger else it will not trigger at all. For the name use for example value1 and use the same name in the sending app. In value (in trigger) set *.
 
Top