Google is committed to advancing racial equity for Black communities. See how.

Intent class

An Intent is a fundamental building block of module development. Modules will either be started with an intent or will receive an intent after they have been launched. It is up to the module author to decide how to respond to the intents that they receive.

A module will only receive intents which have been registered in their module manifest file. A special case is when they are launched by the system launcher in which case the action will be an empty string.

An example manifest which handles multiple intents would look like:

{
  "@version": 2,
  "binary": "my_binary",
  "suggestion_headline": "My Suggesting Headline",
  "intent_filters": [
    {
      "action": "com.my-pets-app.show_cats",
      "parameters": [
        {
          "name": "cat",
          "type": "cat-type"
        }
      ]
    },
    {
      "action": "com.my-pets-app.show_dogs",
      "parameters": [
        {
          "name": "dog",
          "type": "dog-type"
        },
        {
          "name": "owner",
          "type": "person-type"
        }
      ]
    }
  ]
}

Constructors

Intent ({@required String action, String handler})

Creates an Intent that is used to start a module which can handle the specified action. If an explicit handler is not set the modular framework will search for an appropriate handler for the given action.

Properties

hashCodeint

The hash code for this object. ...
read-only, inherited

runtimeTypeType

A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed. ...
inherited

toString() String

Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool

The equality operator. ...
inherited