Skip to content

Intent — Android Intent Launcher

Summary

  • Internal name: INTENT
  • Category: Android system interaction
  • Purpose: Build and execute an Android Intent to start an Activity or send a Broadcast.
  • Task type: Normal

This task allows an AndroMate workflow to interact with the Android system and installed applications:
open screens (Settings, specific apps, etc.) or send custom broadcast events.


Compatibility

  • Minimum AndroMate version: 1.1.0
  • Maximum AndroMate version: 1.1.0
  • Minimum Android: Android 13 (API 33)
  • Maximum Android tested: Android 16 (API 36)

Supported manufacturers

  • ✅ All manufacturers supported by AndroMate (behavior may vary by firmware)

Required permissions

Depending on the target Intent, Android may require specific permissions:

  • Starting some system or OEM Activities may require special permissions
  • Sending some Broadcasts is restricted or blocked on recent Android versions

Detailed description

The Intent task builds an Android Intent from the provided parameters, dynamically resolved using the AndroMate context (AndroMateContext).

Two execution modes are supported:

ActionType Description
Start Activity Starts an Activity using Context.startActivity()
Send Broadcast Sends a broadcast using Context.sendBroadcast()

Parameters may contain variables (e.g. ${PKG_NAME}) that are resolved before execution.


Input parameters

Parameter Type Required Possible values / Rules Android compatibility AndroMate compatibility Default
Action String No Any valid Intent action (android.intent.action.* or custom) Android 13 (API 33) → Android 16 (API 36) 1.1.0 → 1.1.0 ""
PackageName String No Valid Android package name (com.example.app) Android 13 (API 33) → Android 16 (API 36) 1.1.0 → 1.1.0 ""
ClassName String No Fully qualified class name (com.example.app.MainActivity) Android 13 (API 33) → Android 16 (API 36) 1.1.0 → 1.1.0 ""
Data String No Data URI (tel:, geo:, package:, etc.) Android 13 (API 33) → Android 16 (API 36) 1.1.0 → 1.1.0 ""
ActionType Enum / String Yes Start Activity or Send Broadcast Android 13 (API 33) → Android 16 (API 36) 1.1.0 → 1.1.0

Output parameters

The Intent task does not return any data (no stdout/stderr, no output variables).
Its purpose is to perform a system action, not to produce content.


Parameter details

1. ActionType

Defines the execution mode of the task.

  • Start Activity: starts a target Activity using context.startActivity(intent) with flags:
  • FLAG_ACTIVITY_NEW_TASK
  • FLAG_ACTIVITY_CLEAR_TASK
  • Send Broadcast: sends a broadcast using context.sendBroadcast(intent).

Example

"ActionType": "Start Activity"

or

"ActionType": "Send Broadcast"

2. Action

Represents the Intent action string.

Common examples:

  • android.settings.SETTINGS
  • android.intent.action.VIEW
  • com.example.CUSTOM_EVENT

If no action is provided, the Intent can still be valid if a PackageName + ClassName pair is provided (explicit Intent).

Example

"Action": "android.settings.SETTINGS"

3. PackageName

Specifies the target Android package.
Used to build an explicit Intent together with (PackageName, ClassName).

Example

"PackageName": "com.android.settings"

4. ClassName

Fully qualified Activity class name.

Example

"ClassName": "com.android.settings.Settings"

5. Data

String representing a data URI.

Typical examples:

  • tel:+21690000000
  • package:com.example.app
  • geo:36.8065,10.1815

Example

"Data": "tel:+21690000000"

Execution behavior

  1. The Intent is constructed using the provided parameters
  2. If construction fails → an error is logged
  3. If valid:
  4. Start Activitycontext.startActivity(intent)
  5. Send Broadcastcontext.sendBroadcast(intent)

Exceptions

Code Exception Name Description
Intent-ERROR-001 INTENT_START_ACTIVITY_ERROR Unable to start Activity
Intent-ERROR-002 INTENT_SEND_BROADCAST_ERROR Unable to send broadcast

Complete JSON example

{
  "Intent": [
    {
      "id": "50",
      "title": "Open Android Settings",
      "Action": "android.settings.SETTINGS",
      "PackageName": "com.android.settings",
      "ClassName": "com.android.settings.Settings",
      "Data": "",
      "ActionType": "Start Activity"
    },
    {
      "id": "51",
      "title": "Send custom broadcast",
      "Action": "com.example.CUSTOM_EVENT",
      "PackageName": "com.example.app",
      "ClassName": "",
      "Data": "",
      "ActionType": "Send Broadcast"
    }
  ]
}