AutomateIt Plugin Developer Guide


So you want to develop a plugin for AutomateIt? That’s great!

Luckily, that’s also very easy. This guide will take you through the required steps to create a plugin that can extend AutomateIt capabilities and add triggers and actions.


The AutomateIt plugin SDK is available as a maven dependency and can be found here.
To integrate the plugin SDK into your project a single dependency needs to be added to your build.gradle file:

compile 'com.automateitapp:automateit.plugin.sdk:1.0.4'

My First Plugin

To create a new plugin action or trigger all you need to do is implement a class that extends either PluginAction or PluginTrigger in your plugin project.

Each of these abstract classes requires a set of simple functions to be implemented that provide metadata for the action or trigger (such as title, description, icons and parameters) and the functionality of the action or trigger.

Sample project

The sample project (source code is available here) demonstrates an implementation of four actions and one trigger.


  • Screen ON Trigger – Demo for creating a trigger that responds to the “Screen On” event
  • Action1 – A basic action which shows a Toast message of a text configured by the user. The user can also select the Toast message duration (long or short)
  • Action2 – An action that uses custom views to edit the action parameters. in this case, a basic example of EditText with red text color
  • Action3 – An action that allows the user to select an item from a list of options that configure the action behavior – Select one of three a pre-defined Toast messages
  • Action4 – An action that uses an external activity to configure a specific parameter. Usually, this is not the recommended way to build a plugin (Since it takes the user out of AutomateIt) but might be required in cases such as selecting an image (As used in this example), ringtone or contact.

Before starting to develop your first plugin it’s recommended to browse the sample project and see how it’s implemented.


The Plugin SDK also provides an online documentation for all SDK packages.

User Interface

AutomateIt plugins are designed to provide the user a seamless experience so that even though different developers provide various plugins, they should provide a standard look & feel to the user.

To achieve that, there are several design guidelines that you need to follow, and tools that can assist you when developing a plugin.

  • For each action and trigger you need to create two icons at specific sizes.
    • A large icon that is used on the plugin main activity and the triggers/actions list. This icon must be 48x48dp (e.g. 48x48px for mdpi, 72x72px for hdpi etc.)
    • A small icon that is used on the rule header when editing a rule, Showing the rule details on My Rules or the Rules Market activity or as part of a composite trigger/action. This icon must be 30x30dp (e.g. 30x30px for mdpi, 45x45px for hdpi etc.)
  • The icons should use the standard plugin action and plugin trigger icon templates:
  • App icon does not have to follow the standard used by plugins developed by SmarterApps, but you can use the same template provided

To make it easy for you to create the required resources, you can download AutomateIt Plugin Icons Kit and use the provided template icons and scripts to generate icons in all resolutions.

The AutomateIt Plugin Icons Kit contains two files:

  • demo_plugin_icons.svg – an SVG file with all resources used for the sample project. This file can be edited with vector images editing tools such as Adobe Illustrator or Inkscape (free)
  • ExportAllIcons.bat – this batch file uses Inkscape to export the icons in all resolutions.
    • To use the batch file you may need to update the line SET inkscape_exe=”C:\Program Files\Inkscape\inkscape” to refer to your Inkscape install location
    • Make sure you have a C:\Temp folder
    • The script takes two parameters:
      • Input file: path to the SVG file containing the icons
      • Output folder: path to a folder in which the output drawables will be created
    • Run the script from a cmd window as follows: ExportAllIcons.bat <path_to_svg> <path_to_output_folder>
    • The batch file processes all objects whose id starts with “ic_” and exports them to drawables in all resolutions (Set the object id by selecting it and click Shift+Ctrl+O)




If you are using Proguard to obfuscate you plugin code, please make sure to include the following keep options in your file:

-keep class * extends com.smarterapps.automateitplugin.sdk.PluginAction
-keepclassmembers class * extends com.smarterapps.automateitplugin.sdk.PluginAction {
public <methods>;

-keep class * extends com.smarterapps.automateitplugin.sdk.PluginTrigger
-keepclassmembers class * extends com.smarterapps.automateitplugin.sdk.PluginTrigger {
public <methods>;

-keep class * extends com.smarterapps.automateitplugin.sdk.IPluginDataFieldCustomView
-keepclassmembers class * extends com.smarterapps.automateitplugin.sdk.IPluginDataFieldCustomView {
public <methods>;

-keepclassmembers class com.smarterapps.automateitplugin.sdk.PluginValidationResult {
public <methods>;

FAQ & Troubleshooting

When a plugin APK is installed, validation is performed for all actions and plugins contained in it (All classes that extend PluginAction or PluginTrigger); In case there is an error while validating the action or trigger, it will not be shown on the plugin main activity and within AutomateIt.

To find out the cause for the error, please check your logcat and look for errors with tag “AutomateItPlugin”.

Take a look at the list below for possible errors in validation (The list is not final and additional errors may cause validation failure):

For feedback, questions and general discussion, please refer to the XDA thread for AutomateIt Plugin Development