"Enter Packages Names" for the "Application Launched/Closed'' trigger

MaxDuh

New member
Take a look at my macro in the attachements.
As you can guess, my macro turn off the airplane mode when I launch an app from a certain list and turn it on when I leave an app from the same list.
The problem is that I have to modify the two list (and even a third one in the ''If'' conditions) separately, they are not sync. So what I think would be a great feature is to make possible to use a variable as a list of apps' package name in the ''Application Launched/Closed'' trigger, the ''Application running'' condition, etc.. This would make possible to synchronize changes more easily.
This feature would be great it think !
 

Attachments

  • Screenshot_20230507-161815_MacroDroid.jpg
    Screenshot_20230507-161815_MacroDroid.jpg
    300.2 KB · Views: 16

Dm114

Well-known member
Take a look at my macro in the attachements.
As you can guess, my macro turn off the airplane mode when I launch an app from a certain list and turn it on when I leave an app from the same list.
The problem is that I have to modify the two list (and even a third one in the ''If'' conditions) separately, they are not sync. So what I think would be a great feature is to make possible to use a variable as a list of apps' package name in the ''Application Launched/Closed'' trigger, the ''Application running'' condition, etc.. This would make possible to synchronize changes more easily.
This feature would be great it think !
It's roughly the same question as in your previous thread...

What kind of new feature do you request? To know if an app is running, just verify if it is the foreground app.

According to your list of apps I gave you an idea I personally use in some if my macros and it works fine.
 

Jo12345

New member
Hi
It's roughly the same question as in your previous thread...

What kind of new feature do you request? To know if an app is running, just verify if it is the foreground app.

According to your list of apps I gave you an idea I personally use in some if my macros and it works fine.

Hi Dm114

Can you share how to check if an app is running?
I would like to create a macro that FORCE STOPS battery draining apps such as Facebook, and other apps which are in my 'blacklist' :)
All help is welcome!
 

Dm114

Well-known member
Hi


Hi Dm114

Can you share how to check if an app is running?
I would like to create a macro that FORCE STOPS battery draining apps such as Facebook, and other apps which are in my 'blacklist' :)
All help is welcome!
Unless rooted it's not possible to kill an app.

Anyway you can G**gle some "app killers" like Greenify I've been using for years (even if some people say it is not safe on the confidentiality field).

You can test whether an application is running on foreground or not (IF clause or Constraint) but don't forget that many of those apps will launch automatically even when "killed". If you are speaking about apps you don't use (such as FB) try to deactivate them as uninstalling won't be possible.
 

Jo12345

New member
Thanks for your feedback.
User Lawsonator created a nifty macro called 'Force stop apps', which first gets a complete list of all user installed apps and then 'force stops' them 1 by 1.
His app is working, but it really closes everything... including my anti-virus and other apps that I do not want to be closed :-(
So I am actually trying to figure out how to adjust his macro and only force stop apps that are in a blacklist that I can create and update.
 

Attachments

  • Screenshot_2024-01-29-11-56-45-01.jpg
    Screenshot_2024-01-29-11-56-45-01.jpg
    1.1 MB · Views: 7

Endercraft

Moderator (& bug finder :D)
Thanks for your feedback.
User Lawsonator created a nifty macro called 'Force stop apps', which first gets a complete list of all user installed apps and then 'force stops' them 1 by 1.
His app is working, but it really closes everything... including my anti-virus and other apps that I do not want to be closed :-(
So I am actually trying to figure out how to adjust his macro and only force stop apps that are in a blacklist that I can create and update.
In the macro there seems to be a variable named userExclusions, try setting that to your apps you don't want to be killed (most likely their package names separated by any character you want).
 

Jacob L

Moderator (Lawsonator)
Thanks for your feedback.
User Lawsonator created a nifty macro called 'Force stop apps', which first gets a complete list of all user installed apps and then 'force stops' them 1 by 1.
His app is working, but it really closes everything... including my anti-virus and other apps that I do not want to be closed :-(
So I am actually trying to figure out how to adjust his macro and only force stop apps that are in a blacklist that I can create and update.
That's me. userExclusions variable needs to have the package name for the app you don't want to kill. I may be able to make it better eventually but not until I'm not poorly
 

Dm114

Well-known member
That's me. userExclusions variable needs to have the package name for the app you don't want to kill. I may be able to make it better eventually but not until I'm not poorly
It's exactly what I'm doing for years but, as Application Closed trigger is not reliable, I use Greenify notification and not only close app but also clear cache which someting contains big amounts of data.
 

Dev777

Active member
T
Thanks for your feedback.
User Lawsonator created a nifty macro called 'Force stop apps', which first gets a complete list of all user installed apps and then 'force stops' them 1 by 1.
His app is working, but it really closes everything... including my anti-virus and other apps that I do not want to be closed :-(
So I am actually trying to figure out how to adjust his macro and only force stop apps that are in a blacklist that I can create and update.
Try this. Edit your blacklist apps in the blacklist variable. Separate the packages using | . The command output will only show the running apps which you have blacklisted which you can then stop. If you leave the blacklist variable blank, it shows all running apps.

Disclaimer: Needs ADB WIFI
 

Attachments

  • Running_Apps_Blacklist.macro
    2.1 KB · Views: 1
Top