Aller au contenu

Widgets

Widgets pilotés par push pour l'écran d'accueil, l'écran verrouillé et le mode En veille d'iOS, et pour l'écran d'accueil d'Android. Déclarez un widget une seule fois, mettez à jour son contenu avec un PATCH, et chaque copie placée s'actualise d'elle-même.

Écran d'accueil Android avec quatre widgets PushWard : une sauvegarde à 100 %, le cluster prêt, une API à 1 240 requêtes par minute et le CPU à 27 %

On Android, widgets go on the home screen: long-press it, choose Widgets and add PushWard, then pick which of your widgets it shows. It draws the small, medium or large layout for the space it gets, and long-pressing it again picks another widget.

ℹ Info

Widgets require iOS 26 or later. On older versions the iOS app hides the widget management screen and your widgets remain dormant — the server keeps the content current so they render correctly once the user upgrades.

Widgets work on every Android version the app runs on, Android 12 or later.

Widgets are persistent — once the user pins one to their Home Screen, Lock Screen, or StandByhome screen, it stays there until they remove it. Use a widget for ambient state that should always be glanceable (a sensor reading, a server health indicator, a daily counter). For something that is currently happening and has a known end — a download, a timer, a print — reach for a Live ActivityLive Update instead.

Templates

Each template is tuned for a different shape of data. Tap a card for that template's field list, worked example, and behavior notes; the shared content fields they all accept live in the API reference.On Android the same templates draw in the app's own home screen layout, like the widgets above; the cards show the iPhone ones.

value — Valeur

Un seul grand nombre avec unité, étiquette et flèche de tendance facultatives. Idéal pour les relevés de capteurs et les compteurs.

Required: none (optional value, unit, label, trend)

progress — Progression

Une barre de progression avec étiquette et couleur d'accentuation. Idéal pour les pourcentages d'avancement et les déploiements.

Required: value 0.0 – 1.0

status — Statut

Une pastille de statut iconique pilotée par la gravité (info, avertissement, critique, succès). Aucun chiffre — juste l'état.

Required: none (optional severity: info, warning, critical, success)

gauge — Jauge

Une jauge à aiguille entre un minimum et un maximum configurables. Idéal pour les SLO, les budgets d'erreur et la capacité.

Required: value, min_value, max_value

stat_list — Liste de stats

Jusqu'à six lignes étiquette/valeur. Idéal pour les tableaux de bord compacts — MRR / Abonnements / Essais, Actif / Inactif / Maintenance.

Required: stat_rows (array, 1 – 6 entries)

Bientôt dans la version 1.6 de l'app

Cette section décrit une fonctionnalité d'une mise à jour de l'app en attente de validation par l'App Store. Elle se déverrouille ici automatiquement dès que la mise à jour est disponible.

Bientôt dans la version 1.30.0 de l'app

Cette section décrit une fonctionnalité d'une mise à jour de l'app en attente de validation par l'App Store. Elle se déverrouille ici automatiquement dès que la mise à jour est disponible.

Preview any of them on the playground.

Bientôt dans la version 1.30.0 de l'app

Cette section décrit une fonctionnalité d'une mise à jour de l'app en attente de validation par l'App Store. Elle se déverrouille ici automatiquement dès que la mise à jour est disponible.

How it works

  1. Your integration calls POST /widgets to declare a widget by slug, with a template and initial content.
  2. The user opens the widget picker on their device and selects your slug for any system widget family they want — small, medium, large, accessory-rectangular, accessory-circular, or accessory-inline. The same slug can appear in multiple slots.The user long-presses the home screen, adds the PushWard widget and picks your slug. The widget draws the small, medium or large layout for the space it is given.
  3. Your integration calls PATCH /widgets/{slug} whenever the underlying value changes. The server merges (RFC 7396) and pushes a thin update; the iOS widget extension reloads its timelinethe Android app fetches the new content and redraws the widget.
  4. If a push is missed (background fetch coalescing, no network), iOS calls back into the extension every ~30 minutes for a freshness pullIf a push is missed, the Android app refreshes its placed widgets every 15 minutes and whenever it comes to the foreground — GET /widgets/{slug} always returns the latest content.

Two ways to create widgets

Widgets don't require an integration to exist. There are two paths to the same backend, and both can target the same slug — a widget created in the app can later be driven by an integration, and vice versa.

  • In the iOS app. Open the Widgets tab in PushWard, choose a template, and fill in the slug, name, and initial content. This is the right path for personal widgets — a temperature you key in by hand, a morale dial, a counter you bump from a Shortcut. The new slug appears immediately in the iOS widget picker for Home Screen, Lock Screen, and StandBy.In the Android app. The Widgets tab creates the same widgets: choose a template and fill in the slug, name, and initial content. For the templates an integration usually feeds (trend, battery, schedule, flow, stat list) it starts the widget with a placeholder that your first PATCH replaces, and each widget previews its small, medium and large layouts before you place it.
  • Via the HTTP API. Use this when an external service should keep the widget content current — a homelab probe, a CI job, a smart-home automation. See the API reference.
PushWard sur une tablette Android, avec un rail de navigation et la liste à côté du détail

The Widgets tab on an Android tablet: the list beside the selected widget, with its small, medium and large layouts.

Authentication

The widgets API is reachable with an integration key (hlk_) with widgets at write (or read for a key that only reads them).