Skip to content

feat(android): add widget instance configuration#218

Open
V3RON wants to merge 6 commits into
mainfrom
feature/android-widget-instance-config
Open

feat(android): add widget instance configuration#218
V3RON wants to merge 6 commits into
mainfrom
feature/android-widget-instance-config

Conversation

@V3RON

@V3RON V3RON commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What is this?

This PR adds per-instance configuration support for Android Dynamic Widgets. Apps can now route users into a widget-specific configuration flow, save values for a single placed widget, and keep type-level configuration as a fallback for existing behavior.

How does it work?

Dynamic Android widgets can declare configuration metadata, including a deep link used by the generated Android configuration trampoline. The plugin and CLI validate that this configuration is only used with Dynamic Widgets, generate the Android widget XML and manifest wiring, and add example app wiring for editing a specific widget instance.

At runtime, Android widget configuration is stored in layers: instance values override widget-type values, which override code defaults. The Android client exposes instance-aware configuration APIs and surfaces active widget instance ids so app screens can save values for the correct placed widget.

Why is this useful?

This lets multiple instances of the same Android Dynamic Widget show different user-selected data, such as different accounts, cities, lists, or filters. It also keeps older type-level configuration working while giving Dynamic Widgets a path toward Android-native placement and reconfiguration flows.

V3RON added 6 commits June 24, 2026 11:54
Add per-instance Android widget configuration support, generated configuration trampolines, and example app wiring for configurable widgets.
Adds Android Dynamic Widget configuration schema validation for deep-link setup.
Rejects malformed configuration values before deepLink validation.
Adds bare React Native CLI config parity for Dynamic Widget configuration deep links.
…t-instance-config

# Conflicts:
#	packages/cli/src/config/normalize.ts
#	packages/cli/src/config/types.ts
#	packages/cli/src/index.ts
#	packages/cli/test/cli.test.js
Resolve project-relative Dynamic Widget client source paths during Android placeholder prerendering and defer file-generation detection until Expo provides projectRoot.
@Angelk90

Angelk90 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@V3RON :

  1. What's the point of having setWidgetConfiguration? If you have setWidgetInstanceConfiguration.
  2. If I have two weather widgets installed on my home screen, one configured for London and one for New York, and the data displayed is about an hour old because it hasn't been updated yet, I want to be able to initiate an update directly from the app.

When the user opens the app and requests a refresh for all widgets (for example, by clicking a button), both widgets should receive the new weather data and automatically update, displaying the latest information for their respective cities, just like system weather apps like Samsung Weather.

Is this possible with the current code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants