ThemeStore Store Docs FAQ
Documentation

Click actions

Every trigger and every action an element can carry, and which of them an untrusted theme may use.

On this page

clickActions is a JSON array held in a string. Each entry has a trigger, an action and a value; the value is a formula evaluated when the action fires.

json
"clickActions": "[{\"trigger\":\"long_press\",\"action\":\"go_to_page\",\"value\":\"settings\"}]"

Triggers#

TriggerWhen
tapA single tap.
double_tapTwo taps.
long_pressA press and hold.
swipe_upAn upward swipe on the element.
swipe_downA downward swipe on the element.
submitinput_field only. The keyboard's enter or search key. Giving a field a submit action is what puts that key on the keyboard in the first place.
appearThe element becomes visible.

appear fires on the transition from hidden to visible: a hidden formula turning false, a page being opened, a card scrolling into a list. Two things it deliberately does not do:

  • It does not fire on the state an element is first seen in. Opening the launcher onto a page does not replay every appear on it, and someone whose Private Space was already open is not suddenly scrolled somewhere they did not ask to go.
  • It does not fire again when a scrolled-away card is rebuilt. The launcher remembers what was visible per element, outside the element, precisely so scrolling back does not re-trigger it.

Actions#

ActionValueWhat it does
open_urlAn addressOpens it. Restricted by scheme in an untrusted theme; see below.
open_appPackage nameLaunches the app.
open_roleA role, e.g. default_phoneLaunches whichever app the user chose for that job. See app roles.
open_first_appThe id of an app_gridLaunches the app at the top of that grid, exactly as tapping it would. Meant for the submit key of a search field. Does nothing when the grid shows no app, and never fires from Appear. In an untrusted theme it works from Submit only; see below.
app_shortcutpackage:shortcut-idTriggers an app shortcut.
dialA phone numberOpens the dialler with the number, without calling it.
intentAn intent URIFor themes that need something the actions above do not cover. Heavily restricted in an untrusted theme, and never accepted in the store.
go_to_pagePage idNavigates, even where no cable exists.
scroll_toAn element idBrings the scrolling container holding that element to it. See scroll targets.
set_variablename=valueWrites a variable. Without =, clears it.
open_notifications-Opens the system notification shade.
launcher_settings-Opens the launcher's settings.
unlock_profile / lock_profileProfileUnlocks or locks a work profile or Private Space, so a theme can draw its own lock button.
private_space_settings-Opens the Private Space settings.
notification_access-Opens the permission screen, for the prompt a theme draws behind notification_access.

What an untrusted theme may open#

open_app launches apps of the personal profile only. open_first_app follows the same line by other means: it launches whatever an app grid shows at the top, which can be a work or Private Space app, so in an untrusted theme it only fires from Submit, the moment the reader asks for exactly that result. From a tap anywhere on the page it does nothing.

A theme that came from elsewhere is untrusted until the user says otherwise. For it, open_url accepts only these schemes:

http  https  mailto  tel  sms  smsto  geo  market

Anything else does nothing at all. intent values lose their component, selector and flags, and their address must pass the same list.

app_shortcut does nothing in an untrusted theme. A shortcut runs as the app that published it and can open screens that app keeps to itself, and unlike an intent there is nothing in it the launcher could take away to make it safe.

From Appear, which fires without anyone touching the screen, an untrusted theme may only move its own page: set_variable, scroll_to and go_to_page. Everything that opens something, including the notification shade, needs a gesture.

Two schemes never leave the device and are always allowed as an image source: asset:// for a file inside the theme bundle and app-icon:// for an installed app's icon. They are not accepted as the target of a click action, where they would be an attempt to hand a local file to another app.

This is an allow-list rather than a list of blocked schemes on purpose. A blocked-list only ever covers what somebody thought of at the time, and there was a scheme that dialled diagnostic codes on some phones for exactly as long as nobody had thought of it.

A theme you built yourself is trusted and runs unfiltered. A theme you import that wants more than the hardening allows makes the launcher say so, name the scheme, and ask; see what review checks for what the store does with the same question.

Documentation for launcher 0.1.0-alpha Android 12 and later last updated