Activity in Application Launched/Closed

SPLESHER

New member
Hey,
I have macro which is toggling GPS when I open and close various apps.
Now I also wanted to add Google Weather to this list, more specifically when opening it from At a Glance widget. But I'm totally unable to do it, at least I don't have idea how.
There is option to choose non-launchable apps in Application Launched/Closed, I choosed Google Weather there, but it doesn't toggle GPS.
I wanted to use activity instead, but I don't see any option to set it in these triggers.
Pretty sure this is the activity name
Code:
com.google.android.apps.search.weather.weatherexportedactivity
Any way to get this to work?
@ARME
 

ARME

Active member
Just tried that, configured that constraint, but seems like it doesn't turn location ON,
And also whats about turning OFF location when I leave google weather?

Did you notice that in the trigger it was Google maps ?
To turn location off just add app closed trigger (select the weather app) and attach a constraint to it (location mode > on)
 

SPLESHER

New member
Did you notice that in the trigger it was Google maps ?
To turn location off just add app closed trigger (select the weather app) and attach a constraint to it (location mode > on)
Yeah I noticed that, was wondering if I'm supposed to change it, so now I got location turning ON, but seems like I can't get turning it off to workScreenshot_20240319-133601_MacroDroid.png
 

SPLESHER

New member
Add an "if" action > trigger fired > application launched. Now put the first 4 action inside it
Did this, but still can't get it to turn OFF after leaving app, tried adding IF also for location OFF, but doesn't work any way
 

Attachments

  • 2024-03-20 08_39_44-Zdjęcie - Zdjęcia Google — Mozilla Firefox.png
    2024-03-20 08_39_44-Zdjęcie - Zdjęcia Google — Mozilla Firefox.png
    100.5 KB · Views: 5

ARME

Active member
So I need to put just google app OR weather app? If yes, still doesnt work, tried both, even set two triggers with one app at time, but same

Maybe using package names works. If you need both apps you have to create a dictionary variable and add as a key the app package name and as value the app name (but I think the value it's not important). To get the package name do as I told you in Reddit using the floating text with {fg_app_package}
 

SPLESHER

New member
Maybe using package names works. If you need both apps you have to create a dictionary variable and add as a key the app package name and as value the app name (but I think the value it's not important). To get the package name do as I told you in Reddit using the floating text with {fg_app_package}
I mean, i dont need both apps, as I used that floating text, it said its just ...quicksearchbox, which is just a Google app, no Google Weather app or anything, but setting just Google app doesn't work too
 

ARME

Active member
I mean, i dont need both apps, as I used that floating text, it said its just ...quicksearchbox, which is just a Google app, no Google Weather app or anything, but setting just Google app doesn't work too

Disable the macro and try this one instead
 

Attachments

  • Weather_2.macro
    3.5 KB · Views: 1
Top