Repository navigation
feat(sdk): add AndroidTV / AndroidAuto / AndroidWear UnoFeatures - #23157
Conversation
There was a problem hiding this comment.
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, andAndroidWearentries to theUnoFeatureenum underUnoArea.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.jsonand 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.
|
|
|
|
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]>
0cc9a3b to
cac9943
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23157/wasm-skia-net9/index.html |
…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.
Summary
Adds three new
UnoFeatureenum entries —AndroidTV,AndroidAuto, andAndroidWear— 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>.Related to unoplatform/uno-private#1126.
Related to unoplatform/uno-private#1327.
Related to unoplatform/uno-private#1328.
What's in this PR
src/Uno.Sdk/UnoFeature.csUnoArea.Core.src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.Android.targetsItemGroupblocks gated on$(UnoFeatures.Contains(';androidtv;'))etc., addingXamarin.AndroidX.Leanback,Xamarin.AndroidX.Car.App,Xamarin.AndroidX.Wear, andXamarin.AndroidX.Wear.Tiles.src/Uno.Sdk/packages.jsonAndroidXLeanback,AndroidXCarApp,AndroidXWear,AndroidXWearTiles) withnet10.0overrides matching the existing AndroidX pinning style.src/Uno.Sdk/Sdk/Sdk.props.buildschema.jsonaka.platform.unohelpUrls so the new features appear in MSBuild / IDE intellisense for<UnoFeatures>.doc/articles/features/android-tv.md(edited),android-auto.md(new),android-wear.md(new),doc/articles/toc.yml<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)
unoplatform/uno← this PR (SDK plumbing + docs)unoplatform/uno.templates(PR #2072) — template stamping for new projectsunoplatform/uno.studio(PR #1030) — wizard SVG icons for the new options ← closes the linked uno-private QA issuesTest 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.csprojsucceeds (verified locally).<UnoFeatures>$(UnoFeatures);AndroidTV</UnoFeatures>and confirmXamarin.AndroidX.Leanbackresolves underdotnet list package. Repeat forAndroidAuto(→Xamarin.AndroidX.Car.App) andAndroidWear(→Xamarin.AndroidX.Wear+Xamarin.AndroidX.Wear.Tiles).<UnoFeatures>AndroidTV</UnoFeatures>and verify the project compiles againstnet10.0-androidwith the implicit Leanback reference resolved.android-auto.md,android-wear.md) and verify the cross-references and TOC entries are correct.🤖 Generated with Claude Code