CtrlK
BlogDocsLog inGet started
Tessl Logo

finkel/tasker-xml-authoring

Author and edit Android Tasker XML (tasks, profiles, projects, scenes) for import into the Tasker app — node skeleton, action codes, and per-arg encoding.

97

1.31x
Quality

97%

Does it follow best practices?

Impact

97%

1.31x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-4/

Push a Custom Layout to a Home-Screen Widget

Problem/Feature Description

A developer uses Tasker (6.7+) on Android with the new Widget v2 home-screen widgets. They have already placed a Widget v2 on their home screen and named it Status. Now they want a task that pushes a Custom layout to that widget — the layout is described by a JSON structure that Tasker renders.

The task should build a small layout in a variable and then push it to the named widget using the Widget v2 action with its Layout set to Custom. The layout is a vertically scrolling Column containing two Buttons, one labelled Lights and one labelled Scenes; each button, when tapped, runs a task called Run Section and passes the section name to it.

The file must import cleanly into the Tasker Android app and the widget must actually receive the layout (i.e. the JSON must land in the argument slot the Widget v2 action really reads — a common mistake is putting it in the wrong slot, which imports an empty Custom Layout and fails at run time).

Output Specification

Produce a single Tasker task export file named push_widget (with the correct file extension for a task export) containing a task called "Push Widget" that:

  1. Sets a variable (e.g. %layout) to the JSON layout: a scrolling Column whose children are two Buttons (Lights, Scenes), each running task Run Section with a task variable carrying the button's name.
  2. Uses the Widget v2 action to push that layout to the widget named Status, with the Layout selector set to Custom and the layout JSON taken from the variable.

The file must be importable into the Tasker Android app via its standard import menu, and the Custom layout JSON must be placed in the argument slot the Widget v2 action actually reads.

tile.json