Skip to content

[[widget]] Android Glance build path — wire glance_source (deferred in #1018 / #676) #1139

@proggeramlug

Description

@proggeramlug

[[widget]] Android Glance build path — wire glance_source (deferred in #1018)

Follow-up to: PerryTS/perry#676 / PR #1018 (iOS slice shipped; Android Glance explicitly deferred).
Perry version: 0.5.1011.

Current behaviour

crates/perry/src/commands/compile/widget_build.rs parses glance_source in a [[widget]] entry but, when present, calls warn_skip(... "Android Glance build path not yet wired — follow-up issue #676 (Glance).") and skips it. So perry compile --target android produces an app with no widgets even when the manifest declares them. The iOS .appex embed path works; there is no Android equivalent.

Ask

Wire the glance_source slot the way the iOS swift_source slot is wired:

  • On perry compile --target android, for each [[widget]] with a glance_source, compile the Jetpack Glance / AppWidgetProvider sources and package them into the produced .aab/.apk:
    • Register the AppWidgetProvider (or GlanceAppWidgetReceiver) in the merged AndroidManifest.xml with the android.appwidget.provider <meta-data> and APPWIDGET_UPDATE intent filter.
    • Emit the appwidget-provider XML (sizing/resizing/updatePeriod) from the manifest entry (mirror the iOS Info.plist key emission already implemented).
    • Compile the Kotlin Glance sources via the existing Android Gradle/Kotlin path Perry already uses for the main app.
  • Data sharing parity: pair with appGroup* (Feature request: official @perryts/app-group for cross-process shared storage #675) — Android side reads the same shared store the iOS widgets read, so app→widget data flow is one API on both platforms.

Why this matters (concrete downstream)

Our app (GSC Master) ships 3 home-screen widgets on both iOS and Android. iOS can migrate to the native [[widget]] schema today. Android widgets currently come from a local perry-searchbird-widgets fork (Kotlin Glance + crate-android). We can't fully migrate off that fork — and can't have a single widget pipeline — until the Glance path is wired. Right now the choice is a split pipeline (native iOS + fork Android) or staying entirely on the fork; neither is the intended end state for #676.

Happy to test against our 3 widgets (TopSites / QuickStats / DailyChange) once it lands.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions