Document the declarative schema an OEM config APK can ship as res/xml/oem_wizard.xml to contribute pages to the PawletOS setup wizard. Documentation only; the default config APK ships no live oem_wizard.xml.
72 lines
3.4 KiB
XML
72 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
PawletOS OEM setup-wizard pages — SCHEMA + EXAMPLE (documentation only).
|
|
|
|
To contribute OEM pages to the PawletOS setup wizard, place a file named
|
|
`oem_wizard.xml` in your config APK's `res/xml/` directory. On first boot
|
|
ConfigProvisioner detects it and writes Settings.Global "pawlet.oem_wizard_pkg"
|
|
with your config APK package; the SetupWizard then loads this file, parses it,
|
|
and renders each <page> as a wizard step (near the end, before "complete").
|
|
|
|
Nothing here executes code — it is a declarative model interpreted by the
|
|
wizard. Toggle/choice/input selections are collected and applied to their
|
|
`target` setting at the end of setup (finishSetupWizard).
|
|
|
|
─────────────────────────────────────────────────────────────────────────
|
|
ELEMENTS
|
|
<section title="..."/> a header within the page
|
|
<text value="free text"/> a paragraph (text is in the attribute)
|
|
<image url="https://..."/> a remote image (loaded via Coil)
|
|
<toggle key=".." title=".." subtitle=".." default="true|false"
|
|
target="secure:KEY | global:KEY"/>
|
|
<choice key=".." title=".." default="VALUE" target="secure:KEY|global:KEY">
|
|
<option value="VALUE" label="..."/>
|
|
...
|
|
</choice>
|
|
<input key=".." title=".." hint=".." default=".."
|
|
target="secure:KEY | global:KEY"/>
|
|
<link label="..." action="component:PKG/CLS | intent:ACTION"/>
|
|
|
|
TARGETS (where a selection is written at finish)
|
|
secure:<key> → Settings.Secure
|
|
global:<key> → Settings.Global
|
|
(omit target for a display-only control)
|
|
|
|
LINK ACTIONS (only these two forms are honoured)
|
|
component:com.acme.app/.SetupActivity explicit component
|
|
intent:android.settings.WIFI_SETTINGS explicit action
|
|
|
|
PAGE ICONS (logical names → wizard icon)
|
|
cellular | cloud | settings | info | star | business | shield
|
|
(anything else falls back to a generic icon)
|
|
─────────────────────────────────────────────────────────────────────────
|
|
-->
|
|
<oemWizard version="1">
|
|
|
|
<page id="acme-welcome" title="Welcome to Acme" subtitle="Set up your device" icon="business">
|
|
<image url="https://cdn.acme.com/setup/logo.png"/>
|
|
<text value="Thanks for choosing an Acme device. A couple of quick options:"/>
|
|
|
|
<section title="Acme services"/>
|
|
<toggle key="sync"
|
|
title="Enable Acme Sync"
|
|
subtitle="Back up settings to your Acme account"
|
|
default="true"
|
|
target="secure:acme_sync_enabled"/>
|
|
|
|
<choice key="region" title="Region" default="us" target="secure:acme_region">
|
|
<option value="us" label="United States"/>
|
|
<option value="eu" label="Europe"/>
|
|
<option value="apac" label="Asia-Pacific"/>
|
|
</choice>
|
|
|
|
<input key="fleet_id"
|
|
title="Fleet ID (optional)"
|
|
hint="e.g. ACME-0042"
|
|
target="secure:acme_fleet_id"/>
|
|
|
|
<link label="Open Acme account setup" action="component:com.acme.app/.SetupActivity"/>
|
|
</page>
|
|
|
|
</oemWizard>
|