Launch Intent Action – What’s that???

Launch Intent ActionThe new “Launch Intent Action” released on AutomateIt latest update raised a few questions that are basically saying “What is it, and how do I use it?”.

To better understand this new action, we first need to explain what an Intent is on Android. In a nutshell, an intent is a way of communication between apps so that one app can launch another app screen or notify it to do a specific action.

Each intent has a name (called “Action”) and type (“Activity” – show screen, “Broadcast” – send a message).

To demonstrate the way this action can be used we will launch a web search on the device.


Using the android.intent.action.WEB_SEARCH action (of type “Activity”) will launch the default web search on the device (Such as Google Now).

The Advanced link on the action properties allows further customization of the Intent and is usually optional. For web search action, we can specify a query to be used for search.

The most common way to customize an Intent is to add Extras. we do that by tapping the Add Extra button:

Add Extra button

After adding a new Extra, you can set its name, type and value:

query extra

Launching that action will start the device’ default web search and search for “AutomateIt”:

Search results

Additional properties that can be used to customize an Intent are (From the Android developer documentation):

  • Category – Gives additional information about the action to execute. For example, CATEGORY_LAUNCHER means it should appear in the Launcher as a top-level application, while CATEGORY_ALTERNATIVE means it should be included in a list of alternative actions the user can perform on a piece of data.
  • Data – The data to operate on, such as a person record in the contacts database, expressed as a Uri
  • Package Name – Specifies an explicit name of an app main package. You can take it from the download link of the app. For instance, the Package Name of AutomateIt free version is AutomateIt.mainPackage taken from the download link
  • MIME Type – Specifies an explicit type of the intent data
  • Flags – Set special flags controlling how this intent is handled. Most values here depend on the type of component being executed by the Intent, specifically the FLAG_ACTIVITY_* flags are all for use with Intents of type “Activity”and the FLAG_RECEIVER_* flags are all for use Intents of type “Broadcast”

To get you started with some Intents you can try, take a look at the following lists of Intents:

Sample Rules

Save battery when screen off by AutomateIt Team
Use battery saver to optimize your phone when the screen is turned off

More sample rules…

Feel free to share more links to lists of Intents or rules from the Rules Market in the comments of this post.



Tagged with: ,
12 comments on “Launch Intent Action – What’s that???
  1. I am trying to make a button using launch intent action that allows me to compose an email in gmail with the mailto addresss already filled in.

    If i use android.intent.action.SEND I have not been able to specify gmail over hangouts.

    any guidance would be appreciated.

  2. grins says:

    How might I be able to open a jpg file located in my downloads folder? I can launch the an “Open from” dialog using android.intent.action.OPEN_DOCUMENT after setting the type to images/*, but I want to view the image in full screen, not navigate to it. Is this possible? Ive tried setting the data field to the image location/name.jpg, but that does nothing.

  3. mjtullier says:

    I want to activate the No Disturb app when call status activates (incoming or outgoing), but the app requires check box activation once the app opens. Could the “launch intent action” achieve this? I can create a shortcut in the desktop that activates the app with a single click of the shortcut, but that shortcut is not an option if I try to achieve the same using the “run shortcut action option.

    • AutomateIt says:

      That depends on the external app. In general every shortcut that you can create on your desktop should be available for AutomateIt. If it doesn’t, it may be a non-standard implementation of the external app

  4. Richard says:

    I can’t seem to add any extras.

    Every time I add an extra and tap save, automateit shows red text saying I have invalid extras, even though it validates fine on the screen where extras are added.

    Even following the exact example in this blog post gives the same error.

    • AutomateIt says:

      Please contact our support using the “Support” option from the app “More…” menu so we can investigate the issue

  5. David Forrai says:

    Hi, great app. i’m trying to activate the blue light app. The rule currently in the market just opens the blue light filter app. how can I use the intent in order to open the blue light app +set it to “on”? Thanhks in advance!

    • AutomateIt says:

      For any app-specific intents you should contact the app developer and ask them.
      They might have documentation on the app website or it might not be supported (and in some cases, will be willing to add support for specific intents)

  6. ddbhatt says:

    Hi, Could you please advise how to answer call with intent.

    I am trying to develop rule to answer call when phone is picked up and brought closer to the ear.


Leave a Reply

Your email address will not be published. Required fields are marked *