Skip to content

feat(sdk): add AndroidTV / AndroidAuto / AndroidWear UnoFeatures - #23157

Merged
MartinZikmund merged 3 commits into
masterfrom
dev/mazi/pending/android-tv
Apr 30, 2026
Merged

MartinZikmund merged 3 commits into
masterfrom
dev/mazi/pending/android-tv

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Apr 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds three new UnoFeature enum entries — AndroidTV, AndroidAuto, and AndroidWear — and wires each to the corresponding AndroidX implicit packages so that any Uno.Sdk-based app can opt into a form factor by adding a single token to <UnoFeatures>.

<UnoFeatures>$(UnoFeatures);AndroidTV</UnoFeatures>

Related to unoplatform/uno-private#1126.
Related to unoplatform/uno-private#1327.
Related to unoplatform/uno-private#1328.

What's in this PR

Area Files Notes
SDK enum src/Uno.Sdk/UnoFeature.cs Three new values under UnoArea.Core.
Implicit packages src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.Android.targets Three new ItemGroup blocks gated on $(UnoFeatures.Contains(';androidtv;')) etc., adding Xamarin.AndroidX.Leanback, Xamarin.AndroidX.Car.App, Xamarin.AndroidX.Wear, and Xamarin.AndroidX.Wear.Tiles.
Package version pins src/Uno.Sdk/packages.json Four new groups (AndroidXLeanback, AndroidXCarApp, AndroidXWear, AndroidXWearTiles) with net10.0 overrides matching the existing AndroidX pinning style.
IDE buildschema src/Uno.Sdk/Sdk/Sdk.props.buildschema.json Three new entries with descriptions and aka.platform.uno helpUrls so the new features appear in MSBuild / IDE intellisense for <UnoFeatures>.
Docs doc/articles/features/android-tv.md (edited), android-auto.md (new), android-wear.md (new), doc/articles/toc.yml Each form-factor doc now has a <UnoFeatures> opt-in section plus a "ship a separate {TV/Auto/Wear}-only app alongside a phone app" section explaining the two-app pattern using a class library for shared code.

Why

Today, Android TV requires manual manifest, intent-filter, banner, and focus-highlight setup; Auto and Wear weren't supported as opt-ins at all. Each form factor still required users to research the right AndroidX package and pin a version. With these enum values plus matching template stamping in unoplatform/uno.templates, opting in is a single checkbox in the Studio wizard or a single token in <UnoFeatures> for existing projects.

Merge order (across repos)

⚠️ This PR must merge first so a new Uno.Sdk build is published before the templates / wizard PRs can be validated end-to-end.

  1. unoplatform/uno ← this PR (SDK plumbing + docs)
  2. unoplatform/uno.templates (PR #2072) — template stamping for new projects
  3. unoplatform/uno.studio (PR #1030) — wizard SVG icons for the new options ← closes the linked uno-private QA issues

Test plan

QA test plans (manual emulator validation per form factor) are tracked at unoplatform/uno-private#1126 (TV), unoplatform/uno-private#1327 (Auto), and unoplatform/uno-private#1328 (Wear).

  • dotnet build src/Uno.Sdk/Uno.Sdk.csproj succeeds (verified locally).
  • In a fresh Uno app, set <UnoFeatures>$(UnoFeatures);AndroidTV</UnoFeatures> and confirm Xamarin.AndroidX.Leanback resolves under dotnet list package. Repeat for AndroidAuto (→ Xamarin.AndroidX.Car.App) and AndroidWear (→ Xamarin.AndroidX.Wear + Xamarin.AndroidX.Wear.Tiles).
  • Build the Android head with <UnoFeatures>AndroidTV</UnoFeatures> and verify the project compiles against net10.0-android with the implicit Leanback reference resolved.
  • Render the new docs (android-auto.md, android-wear.md) and verify the cross-references and TOC entries are correct.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 29, 2026 11:08
@github-actions github-actions Bot added area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk labels Apr 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends Uno.Sdk feature opt-ins by adding Android form-factor feature tokens (TV/Auto/Wear) and wiring them to the appropriate AndroidX implicit packages, with accompanying documentation updates so developers can enable each form factor via <UnoFeatures>.

Changes:

  • Added AndroidTV, AndroidAuto, and AndroidWear entries to the UnoFeature enum under UnoArea.Core.
  • Added conditional Android ProjectSystem implicit package references for Leanback, Car App, and Wear (+ Tiles) based on UnoFeatures.
  • Pinned new AndroidX package groups/versions in packages.json and added/updated docs + TOC entries for Android TV/Auto/Wear.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.Android.targets Adds feature-gated AndroidX implicit package references for TV/Auto/Wear.
src/Uno.Sdk/packages.json Adds version pin groups for Leanback/Car App/Wear/Wear Tiles (with net10.0 overrides).
src/Uno.Sdk/UnoFeature.cs Introduces new UnoFeature enum values: AndroidTV, AndroidAuto, AndroidWear.
doc/articles/toc.yml Adds TOC entries for Android Auto and Wear OS docs.
doc/articles/features/android-wear.md New Wear OS opt-in documentation via <UnoFeatures>.
doc/articles/features/android-tv.md Updates Android TV docs to include <UnoFeatures> opt-in guidance + two-app pattern.
doc/articles/features/android-auto.md New Android Auto opt-in documentation via <UnoFeatures>.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 209770 has failed on Uno.UI - docs.

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 209769 has failed on Uno.UI - CI.

MartinZikmund and others added 3 commits April 30, 2026 13:49
Adds three new entries to the UnoFeature enum and wires them up to
implicit AndroidX package references (Leanback, Car.App, Wear, Wear.Tiles)
via Uno.Implicit.Packages.ProjectSystem.Android.targets.

Updates the existing Android TV documentation with the new <UnoFeatures>
opt-in path and a section on shipping a separate TV-only app, and adds
two new docs covering Android Auto and Wear OS support (each documenting
both the dual-form-factor opt-in and the standalone two-app pattern).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Adds AndroidTV / AndroidAuto / AndroidWear entries to Sdk.props.buildschema.json
so the new features show up with descriptions and aka.platform.uno helpUrls
in MSBuild / IDE intellisense for <UnoFeatures>.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/pending/android-tv branch from 0cc9a3b to cac9943 Compare April 30, 2026 11:51
@MartinZikmund
MartinZikmund enabled auto-merge April 30, 2026 12:02
@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund merged commit 70f56cb into master Apr 30, 2026
65 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/pending/android-tv branch April 30, 2026 14:20
pull Bot pushed a commit to Stars1233/uno that referenced this pull request May 2, 2026
…on guard

- Fix Xamarin.AndroidX.Car.App → Xamarin.AndroidX.Car.App.App (wrong package ID)
- Fix Xamarin.AndroidX.Wear net10.0 override 1.3.0.17 → 1.4.0.1 (non-existent version)
- Fix Xamarin.AndroidX.Wear.Tiles base 1.4.0.2 → 1.4.0.1, net10.0 1.4.0.3 → 1.4.1 (non-existent versions)
- Add validate-packages-json.ps1 CI guard that checks all NuGet entries exist
- Integrate guard into Setup/Validations stage of Azure DevOps pipeline

These broken entries were introduced in PR unoplatform#23157 and block downstream consumers
(e.g. uno.toolkit.ui PR unoplatform#2072) from resolving packages on net10.0-android.
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants