Skip to content

Text Report

Summary

  • Internal name: TextReport
  • Category: Tools
  • Purpose: Write a labelled text message to the AndroMate execution report with a specified display type (Info, Title, or Error).
  • Task type: Normal

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:

    • ✅ Samsung (One UI 6.x / 7.x / 8.x)
    • ✅ Google Pixel (Android Stock)
    • ⚠️ Other manufacturers — not tested
  • Required permissions:

    • None

Detailed description

The Text Report task writes a message to the AndroMate execution report during workflow execution. The message is resolved from the texte field (supports $workflow_variable references) and rendered according to the display type set in texte_type.

Three display types are available:

texte_type value Display type Effect
"Info Text" Informational Adds a standard info-level message to the report
"Title Text" Title / Header Adds a title or section header to the report
"Error Text" Error Adds an error-styled message to the report

Note: Any value of texte_type other than the three listed above triggers a Text-Report-ERROR-001 exception.


Input parameters

Parameter Type Required Possible values Android Compatibility AndroMate Compatibility Default
texte String Yes Any string — supports $variable references Android 13 (API 33) → Android 16 (API 36) 1.1.0 → 1.1.0 ""
texte_type String Yes "Info Text" / "Title Text" / "Error Text" Android 13 (API 33) → Android 16 (API 36) 1.1.0 → 1.1.0 ""

Output parameters

This task produces no output variables. It returns VoidResult.

Field Type Trigger condition Default
VoidResult Always

Exceptions

Code Exception Name Description
Text-Report-ERROR-001 Unsupported Text Type The value provided in texte_type is not one of the supported types: "Info Text", "Title Text", "Error Text".
ERROR-000 Other Error An unexpected runtime error occurred during execution.

Execution flowchart

The following diagram illustrates the actual implementation based on the Android code:

flowchart TD
    Start([Start TextReportTask]) --> ResolveText[🔄 Resolve texte\nfrom workflow context]
    ResolveText --> ParseType{Parse texte_type}

    ParseType -->|"Info Text"| InfoOp[📋 rs.info\nWrite info message to report]
    ParseType -->|"Title Text"| TitleOp[📋 rs.appendTitle\nWrite title to report]
    ParseType -->|"Error Text"| ErrorOp[📋 rs.errorMsg\nWrite error message to report]
    ParseType -->|Unknown| E1[❌ Text-Report-ERROR-001]

    InfoOp --> Success([✅ VoidResult])
    TitleOp --> Success
    ErrorOp --> Success
    E1 --> Error([❌ Exception])

    style Start fill:#e3f2fd
    style Success fill:#c8e6c9
    style Error fill:#ffcdd2
    style E1 fill:#ffcdd2
    style ResolveText fill:#fff9c4
    style InfoOp fill:#c8e6c9
    style TitleOp fill:#c8e6c9
    style ErrorOp fill:#ffe0e0

How it works:

  1. Resolve text: texte is resolved from the workflow context (replacing $variable references)
  2. Parse type: texte_type is matched against the three supported string values (case-insensitive)
  3. Write to report: the appropriate report method is called
  4. Result: returns VoidResult on success

Code examples

Example 1 — Info message

{
  "TextReport": [
    {
      "id": "1",
      "title": "Log step",
      "texte": "Ping started toward 8.8.8.8",
      "texte_type": "Info Text"
    }
  ]
}

Example 2 — Section title

{
  "TextReport": [
    {
      "id": "2",
      "title": "Section header",
      "texte": "Network Measurements",
      "texte_type": "Title Text"
    }
  ]
}

Example 3 — Error message with variable

{
  "TextReport": [
    {
      "id": "3",
      "title": "Log failure",
      "texte": "Task $failed_task_id failed: [$error_code] $error_desc",
      "texte_type": "Error Text"
    }
  ]
}

Input parameter details

1. Input parameter: texte

The text content to write to the execution report. Supports $workflow_variable references — resolved at runtime before writing.

  • Default: "" (empty string)
  • Supports variables: Yes

2. Input parameter: texte_type

Controls how the message is rendered in the AndroMate execution report.

Value Report method Rendering
"Info Text" rs.info() Standard informational message
"Title Text" rs.appendTitle() Section header / title
"Error Text" rs.errorMsg() Error-styled message
  • Default: "" — triggers Text-Report-ERROR-001 if not set to a valid value

Complete JSON example

{
  "TextReport": [
    {
      "id": "1",
      "title": "Log download result",
      "texte": "Downloaded $file_size bytes in $dl_time_ms ms",
      "texte_type": "Info Text"
    }
  ]
}