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
97%
Does it follow best practices?
Impact
97%
1.31xAverage score across 4 eval scenarios
Passed
No known issues
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).
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:
%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.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.