Creating single trigger to fire off when *any* app enters the foreground?

HippoMan

New member
I'm in the process of trying to move from Tasker to Macrodroid, but I haven't been able to figure out how to create the following trigger ...

In Tasker, there is a "context" (same as a Macrodroid trigger) which can be set to fire off whenever any app is invoked in the foreground. It sets two variables, one containing the name of the app which is now in the foreground, and the other containing that app's package name. Those variables can then be queried.

I'm trying to accomplish the same thing with a Macrodroid trigger. I don't want to set a separate trigger for each of the more-than-100 apps on my device, so I am wondering whether there might be a way to install one single trigger which will fire off when *any* app enters the foreground, and which will make that app's name and package name available.

Any suggestions?

Thank you very much in advance.
 

Dm114

Well-known member
I'm in the process of trying to move from Tasker to Macrodroid, but I haven't been able to figure out how to create the following trigger ...

In Tasker, there is a "context" (same as a Macrodroid trigger) which can be set to fire off whenever any app is invoked in the foreground. It sets two variables, one containing the name of the app which is now in the foreground, and the other containing that app's package name. Those variables can then be queried.

I'm trying to accomplish the same thing with a Macrodroid trigger. I don't want to set a separate trigger for each of the more-than-100 apps on my device, so I am wondering whether there might be a way to install one single trigger which will fire off when *any* app enters the foreground, and which will make that app's name and package name available.

Any suggestions?

Thank you very much in advance.
You're right, there is no trigger for 'any app in foreground' but you could tick all the apps in the app list
 

HippoMan

New member
I'm sorry for the late reply.

Thank you. I now see that I only need one trigger. However, ticking each app is problematic, because I have more than 200 apps on my device, and all that ticking is a nuisance.

I realize that it's only a one-time nuisance, and I guess I could live with that, but there is another problem: whenever I install a new app, I will have to remember to go to Macrodroid and update that trigger to respond to the newly installed app.

I'm going to keep trying to think of perhaps another way to accomplish this. If I figure anything out, I'll post my findings here.
 

tanutanu

Well-known member
I'm in the process of trying to move from Tasker to Macrodroid, but I haven't been able to figure out how to create the following trigger ...

In Tasker, there is a "context" (same as a Macrodroid trigger) which can be set to fire off whenever any app is invoked in the foreground. It sets two variables, one containing the name of the app which is now in the foreground, and the other containing that app's package name. Those variables can then be queried.

I'm trying to accomplish the same thing with a Macrodroid trigger. I don't want to set a separate trigger for each of the more-than-100 apps on my device, so I am wondering whether there might be a way to install one single trigger which will fire off when *any* app enters the foreground, and which will make that app's name and package name available.

Any suggestions?

Thank you very much in advance.
It should be working well for your case. You might consider it strange a little bit as the Tasker common sense though.
 

Attachments

  • Screenshot_20211214-034433~2.png
    Screenshot_20211214-034433~2.png
    1.2 MB · Views: 10
  • Screenshot_20211214-034506~2.png
    Screenshot_20211214-034506~2.png
    57.1 KB · Views: 9
  • Screenshot_20211214-034535~2.png
    Screenshot_20211214-034535~2.png
    76.5 KB · Views: 9
  • Screenshot_20211214-034607~2.png
    Screenshot_20211214-034607~2.png
    59.6 KB · Views: 7
  • Screenshot_20211214-034627~2.png
    Screenshot_20211214-034627~2.png
    39.7 KB · Views: 9
Last edited:
Top