Changes

no edit summary
Line 1: Line 1: −
<pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;">
+
<pre class="header-style">The Notification Bar Button trigger fires when the associated button is pressed in the MacroDroid notification button bar. This allows you to create quick-access buttons in the notification area that trigger macros with a single tap. The notification buttons can be configured via the "Notification Bar Options" on the MacroDroid home screen.</pre>
Will fire when the associated button is pressed in the notification button bar.
  −
</pre>
     −
'''Example Usage'''<br/>
+
''' Options '''
   −
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
+
''' Button Selection '''
Triggers
      +
First, you must select which notification button will trigger this macro. The available buttons are configured in MacroDroid's notification bar settings. If no buttons are configured, you will be prompted to set them up first.
   −
</pre><br>
+
''' Collapse on Press '''
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
  −
Actions
      +
* '''Enabled (default)''' - The notification bar will collapse and return to its normal state after the button is pressed
 +
* '''Disabled''' - The notification bar remains expanded after the button is pressed, allowing for additional actions without closing the notification panel
   −
</pre><br>
+
Note: On Android 12+, the collapse functionality requires Accessibility Service to be enabled for MacroDroid.
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
  −
Constrains
      +
''' Examples '''
   −
</pre><br>
+
''Example 1: Quick toggle for flashlight''
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
  −
Local variables
      +
  <pre class="trigger-style">Triggers
   −
</pre><br>
+
Notification Bar Button: Button 1 (Flashlight)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Toggle Flashlight</pre>
 +
 
 +
''Example 2: Launch favorite app from notification bar''
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Notification Bar Button: Button 2 (Camera)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Launch Application: Camera</pre>
 +
 
 +
''' Configuration '''
 +
 
 +
To configure notification buttons:
 +
1. Open MacroDroid
 +
2. Tap "Notification Bar Options" on the home screen (or access via Settings)
 +
3. Add and configure your notification buttons with custom icons and labels
 +
4. Enable the buttons you want to appear in the notification area
 +
 
 +
''' Notes '''
 +
 
 +
* Each notification button has a unique ID - the trigger will only fire for the specific button selected during configuration
 +
* Notification buttons appear in MacroDroid's persistent notification
 +
* Custom icons can be assigned to each button for easy identification
 +
* The notification bar must be enabled in MacroDroid settings for buttons to appear
 +
* Buttons are displayed with their configured icon; the trigger shows the button number and icon in the macro editor
 +
 
 +
''' See Also '''
 +
 
 +
* [[MacroDroid Notification]]
 +
* [[Trigger: Quick Settings tile]]
 +
* [[Trigger: Widget Button]]