Skip to content

Trigger actions & macros

Only for Pro version

Available only in Pro version

Trigger actions

Trigger actions are macros that are launched for a specific action. The tvQuickActions has some predefined actions to run chosen actions:

  • Turning on the device - when the device's power supply is plugged in or the device is rebooted
  • Screen on (after sleep) - when you use a remote control to turn on a device
  • Screen off (go to sleep) - when you turn off the device with the remote control in standby mode

Let's look at the "Turning on the device" for example:

You can see only two menu items:

  • Enable - you can disable or enable trigger actions here if you want to prevent running them and save the actions

  • Actions - here you can add actions to run on the trigger

To add actions go to Actions, then use the "Add" button in the opened dialog.

For example, I added a YouTube app.

This means that when I apply power to the device or reboot it, YouTube will start.

Notice

But when I turn on the device using the remote, YouTube will not start. For this, you need to use the "Screen on (after sleep)" trigger.

Macros

Macros - a sequence of actions to automate something.

You can create your macros using the "Add" button at the bottom of the "Trigger actions & Macros" screen.

Title

First of all, the app suggests setting the title. The title is created automatically, but if you have many macros you need to understand the title.

Icon

You can change the icon from a large icon pack or file

Icon from file

To choose a file on Android 11+ you need to have any file manager installed

Actions

For macros you can see the next dialog for actions:

To add one more action to the menu use the "Add" button at the bottom of the dialog:

An important difference between choosing actions for a macro is the ability to add a delay between actions

To sort or delete an action use a long press on the action:

So we added the "Take screenshot" action to the macro and ended up with a macro that doesn't make sense but works for the example.

The macro opens the Play Store and takes a screenshot after 2 seconds.

Triggers

By default, you can map macros to a button or menu and run it by button press or from the menu. But also you can configure automatic triggers for macros. It can be:

  • Logcat Entry - any line from logcat
  • Schedule - run on configured time and day
  • App moves to foreground/background
  • Bluetooth device connected/disconnected

Logcat Entry

Here is part of the logcat:

09-15 07:11:59.585  1077  1077 I GoogleInputMethodService: GoogleInputMethodService.shouldHideHeaderOnInitialState():4091 ShouldHideHeaderOnInitialState = false
09-15 07:11:59.585  1077  1077 I GoogleInputMethodService: GoogleInputMethodService.updateDeviceLockedStatus():2111 repeatCheckTimes = 1, locked = false
09-15 07:11:59.910  1077  1108 W putmethod.lati: Reducing the number of considered missed Gc histogram windows from 178 to 100
09-15 07:12:00.044   525   688 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x10000000 pkg=com.mixplorer cmp=com.mixplorer/.activities.BrowseActivity} from uid 10054
09-15 07:12:00.046   525   688 W ActivityTaskManager: Can't find TaskDisplayArea to determine support for multi window. Task id=1246 attached=false

We can find the next line

09-15 07:12:00.044   525   688 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x10000000 pkg=com.mixplorer cmp=com.mixplorer/.activities.BrowseActivity} from uid 10054

Where ActivityTaskManager is a tag, and the text after ":" can be used as a filter.

Let's use it

So the macros will be run when you open MiXplorer from the launcher. In my case, it will take a screenshot, for example, to see when MiXplorer was opened.

Schedule

Here you can set a schedule for when macros must be run. For example, in the screenshot, we choose 2:12 every day except Saturday and Sunday, so at this time will run macros.

App moves to foreground/background

Here you can set app movements as triggers for macros. For example, do something when the user opens Play Store:

Bluetooth device connected/disconnected

Connection or disconnection of Bluetooth device can used as a trigger for your macros:

Delete

Delete the macros.