Setting up AutoInput with Tasker

AutoInput is a Tasker plugin that allows you to simulate touch gestures and interact with apps in ways that Tasker alone can’t do. This powerful plugin is particularly useful when you want to automate actions in apps that don’t have built-in support for Tasker. With AutoInput, you can simulate button presses, swipe gestures, and even navigate through apps to automate complex tasks.

If you are wondering what you would use this for, I have this set up as part of my bedtime routine. This application I automate is headspace. After my routine pairs my phone with my google speakers via bluetooth, it starts headspace. Once in headspace, it navigates to favourites and starts "Sleeper Mountain".

Here’s a step-by-step guide to help you set up and use AutoInput with Tasker.

Step 1: Install AutoInput

  1. Download AutoInput from Google Play Store:
    AutoInput is a paid plugin for Tasker, available in the Google Play Store. Search for AutoInput and download it.
  2. Grant Accessibility Permissions:
    After installing, you need to enable accessibility permissions for AutoInput. This allows the app to simulate user input, such as taps and swipes.
    • Open the AutoInput app.
    • Go to Settings and enable Accessibility Service by following the on-screen prompts.
    • Make sure that AutoInput is allowed to control your device in the Accessibility section of your Android settings (usually under Settings > Accessibility > AutoInput).

Step 2: Create a Task in Tasker

Once AutoInput is installed and the necessary permissions are granted, you can begin using it within Tasker.

  1. Open Tasker:
    Launch Tasker on your Android device.
  2. Create a New Task:
    • Go to the Tasks tab.
    • Tap the "+" button to create a new task.
    • Give your task a name (e.g., "AutoInput Example").

Step 3: Add AutoInput Action to Your Task

To simulate actions with AutoInput, you'll need to add AutoInput actions to the task you created.

  1. Add an Action:
    • Tap the "+" button to add an action to your task.
    • Choose Plugin from the list of available actions.
    • Select AutoInput from the list of plugins.
    • Choose an Action based on what you want to do. Here are some common options:
      • AutoInput Action: Use this to simulate specific gestures like taps, swipes, and text input.
      • AutoInput UI Query: Use this to interact with or retrieve information from the UI elements of an app.
  2. Configure the Action:Example: Simulating a Button Tap in an App
    • Once you select AutoInput Action, tap on the pencil/edit icon to configure the action.
    • You’ll see different options depending on the type of action you’re selecting. Here’s a breakdown of the most common ones:
      • Type: Choose the type of action (e.g., Click, Long Click, Swipe).
      • Package: Specify the app where the action should occur (e.g., "com.android.chrome" for Chrome).
      • Component: If necessary, specify the exact activity within the app you want to interact with.
      • Text: If you're inputting text into a field (like in a form or search box), enter the text here.
      • Element: You can select which UI element to interact with using an UI Query if you need to reference a specific button or field within the app.
    • Type: Select Click.
    • Package: Select the app you want to interact with (e.g., com.google.android.apps.maps for Google Maps).
    • Element: Specify the button or element to click, which you can identify using AutoInput’s UI Query feature or by tapping the element on the screen to have Tasker capture its properties.
  3. Test Your Action: After configuring the action, tap the checkmark to save it. Run the task by tapping the play icon and verify that AutoInput is successfully simulating the input action.

Step 4: Use AutoInput with Profiles

Once you’ve set up an AutoInput task, you can integrate it with Tasker profiles for automated actions based on triggers like location, time, or other events.

  1. Create a New Profile:
    • Go to the Profiles tab in Tasker.
    • Tap the "+" button to create a new profile and choose a Trigger (e.g., Bluetooth Connected, Time, or App Opened).
  2. Link the Task to the Profile:
    • After selecting the trigger, Tasker will prompt you to link a task. Select the task you created earlier (e.g., "AutoInput Example").
    • Tasker will now execute the AutoInput action whenever the trigger conditions are met.

Step 5: Explore Advanced AutoInput Features

  1. UI Query:
    • Use the AutoInput UI Query to find and interact with specific UI elements inside apps, such as buttons, text fields, and images. This allows you to simulate actions like clicking a button or entering text based on the current interface state.
  2. AutoInput Gestures:
    • You can simulate more complex gestures like swipes, scrolls, or long presses by selecting the appropriate gesture type when setting up AutoInput actions.
  3. Using Variables with AutoInput:
    • You can use Tasker variables to make the AutoInput action more dynamic. For example, you could use a variable to input custom text into a search box or interact with different UI elements based on dynamic conditions.

Troubleshooting Tips

  • Ensure AutoInput Permissions: If AutoInput isn’t working as expected, double-check that it has the necessary Accessibility permissions.
  • Capture UI Elements: If you’re unsure about the UI element you want to interact with, use the UI Query feature to capture properties of elements and test them.
  • Check App Compatibility: Not all apps may be compatible with AutoInput due to their unique UI structures or restrictions. In such cases, using UI Query can help you find the right elements.

Final Thoughts

AutoInput is an essential tool for automating complex tasks on Android devices, especially when Tasker’s native capabilities fall short. By simulating gestures and interacting with app interfaces, AutoInput helps bridge the gap between simple automation and more advanced control of your device.

Start with simple actions, like tapping buttons or entering text, and gradually explore more advanced features, such as dynamic UI queries and gesture simulations. With practice, you’ll be able to create powerful, customized automation that improves your Android experience.

As an Amazon Associate I earn from qualifying purchases.

If you have found this post useful, please consider donating.