Difference between revisions of "Trigger: Application Launched/Closed"

m
Line 1: Line 1:
 
<p><b>This trigger fires when an application is launched or closed.</b></p>
 
<p><b>This trigger fires when an application is launched or closed.</b></p>
 +
 +
===<p><b>Magic Text</b></p>===
  
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
There are also two methods, due to recent changes to Android, there is a faster method with the use of accessibility services, however it is still possible to avoid accessibility services by ticking the box 'force legacy system'
+
This action supports the use of magic text, you can use it in the "Enter package name" option, you can manually define the package name if you know it or by extracting it from some previously defined variable, using the (...) button.
Accessibility can be granted by following the steps in the popup or by pressing the notification that appears from MacroDroid.
+
It also has magic output text [app_name] and [app_package] </pre> [[Magic_text|More information on the associated magic text.]]
Any other issues, please consult the Troubleshooting section under the left hamburger menu from the MacroDroid home screen.
+
<br>
</pre><br>
 
  
<p><b>Supported configurations:</b></p>
+
===<p><b>Supported configurations</b></p>===
  
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
Line 15: Line 16:
 
Prevent notifications interfering:
 
Prevent notifications interfering:
 
Swiping down the status bar may interfere with this trigger. This option prevents this interference but may cause issues with the trigger on some devices.
 
Swiping down the status bar may interfere with this trigger. This option prevents this interference but may cause issues with the trigger on some devices.
 +
 +
More information about this:
 +
 +
Due to changes to Android, there is a faster method with the use of accessibility services, however it is still possible to avoid accessibility services by ticking the box 'force legacy system'
 +
Accessibility can be granted by following the steps in the popup or by pressing the notification that appears from MacroDroid.
 +
Any other issues, please consult the Troubleshooting section under the left hamburger menu from the MacroDroid home screen.
 
</pre><br>
 
</pre><br>
  
<p><b>Example Usage:</b></p>
+
===<p><b>Example Usage 1</b></p>===
  
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
Line 39: Line 46:
 
</pre><br>
 
</pre><br>
  
<p><b>Example Usage:</b></p>
+
===<p><b>Example Usage 2</b></p>===
  
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">

Revision as of 18:58, 5 December 2023

This trigger fires when an application is launched or closed.

Magic Text

This action supports the use of magic text, you can use it in the "Enter package name" option, you can manually define the package name if you know it or by extracting it from some previously defined variable, using the (...) button.
It also has magic output text [app_name] and [app_package] 

More information on the associated magic text.


Supported configurations

Force legacy mechanism:
Try this option if you have issues with the new application launched trigger implementation, or don't want to enable Accessibility access for MacroDroid.

Prevent notifications interfering:
Swiping down the status bar may interfere with this trigger. This option prevents this interference but may cause issues with the trigger on some devices.

More information about this:

Due to changes to Android, there is a faster method with the use of accessibility services, however it is still possible to avoid accessibility services by ticking the box 'force legacy system'
Accessibility can be granted by following the steps in the popup or by pressing the notification that appears from MacroDroid.
Any other issues, please consult the Troubleshooting section under the left hamburger menu from the MacroDroid home screen.


Example Usage 1

When starting YouTube the screen rotation will be activated


Triggers

Application launched (YouTube)


Actions

Enable screen rotation.


Constraints



Example Usage 2

When closing YouTube the screen rotation will be deactivate


Triggers

Application closed(YouTube)


Actions

Disable screen rotation.


Constraints