Repository navigation
feat(unoapp): add Android TV / Auto / Wear OS opt-ins - #2072
Merged
Merged
Conversation
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Android TV / Android Auto / Wear OS opt-in flags to the unoapp template and wires them into both dotnet new and the Uno Studio wizard, stamping the necessary Android manifest/code/resources and <UnoFeatures> entries.
Changes:
- Introduces three new template parameters (
includeAndroidTV,includeAndroidAuto,includeAndroidWear) plus computed gating symbols and resource excludes. - Stamps Android TV/Auto/Wear-specific manifest entries, TV intent filter + banner/uses-feature attributes, and Auto/Wear resources.
- Updates the Studio wizard configuration and adds a design spec documenting the behavior.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Platforms/Android/Resources/xml/automotive_app_desc.xml | Adds Automotive app description resource for Android Auto opt-in. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Platforms/Android/Resources/values/Styles.AndroidTV.xml | Adds TV-specific style override to disable native highlight. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Platforms/Android/Resources/drawable-xhdpi/banner.png | Adds placeholder Android TV banner drawable. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Platforms/Android/MainActivity.Android.cs | Adds conditional Leanback launcher intent filter for Android TV. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Platforms/Android/Main.Android.cs | Adds conditional UsesFeature attributes + banner on ApplicationAttribute for TV. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Platforms/Android/AndroidManifest.xml | Adds conditional uses-feature entries and Auto meta-data stamping. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/MyExtensionsApp.1.csproj | Adds conditional <UnoFeatures> entries for TV/Auto/Wear. |
| src/Uno.Templates/content/unoapp/.template.config/template.json | Declares new parameters/computed symbols and excludes gated resources. |
| src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json | Adds wizard MultiSelect section + metadata + exportable symbols for new options. |
| specs/002-android-form-factors/spec.md | Documents the opt-in design and stamped outputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
morning4coffe-dev
approved these changes
Apr 30, 2026
MartinZikmund
force-pushed
the
dev/mazi/androidtv
branch
from
May 4, 2026 15:05
7634e0f to
43f5ca0
Compare
MartinZikmund
force-pushed
the
dev/mazi/androidtv
branch
from
June 11, 2026 16:09
43f5ca0 to
8179718
Compare
ajpinedam
approved these changes
Jul 21, 2026
Adds three template parameters (includeAndroidTV, includeAndroidAuto, includeAndroidWear) that surface as wizard checkboxes in a new "Android form factors" sub-section under Platforms. Each opt-in stamps the required AndroidManifest entries, intent filters, resources, and <UnoFeatures> flags so users do not need any manual Android setup to target these form factors from a fresh project. The opt-ins produce a single APK that targets phones plus the chosen form factor(s); a standalone Wear-only / TV-only / Auto-only project is out of scope and documented in the corresponding feature pages of the unoplatform/uno repo. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…or conditionals - Move the transparent colorControlHighlight item into AppTheme in Styles.xml (conditionally stamped) so the override actually applies via postSplashScreenTheme; remove the unreferenced Styles.AndroidTV.xml - Gate the UnoFeatures entries on the computed useAndroidTV/Auto/Wear symbols so CLI generation without the Android platform cannot stamp stray tokens - Declare the leanback/touchscreen uses-feature entries only in AndroidManifest.xml, removing the duplicate assembly-level [UsesFeature] attributes and the unused Android.Content.PM using - Update the spec to match (and fix the dotnet new CLI flag syntax) Co-Authored-By: Claude Fable 5 <[email protected]>
ajpinedam
force-pushed
the
dev/mazi/androidtv
branch
from
July 22, 2026 18:20
61587e2 to
9879fea
Compare
Contributor
|
rebased and force-pushed looking to fix the CI errors. |
Reorder the groups in src/Uno.Sdk/packages.json to match the exact group order of uno core (unoplatform/uno src/Uno.Sdk/packages.json) so that release-time diffs between the two manifests stay minimal and reviewable. Only ordering changes: WinAppSdkBuildToolsWinApp moves up after WinAppSdkBuildTools, and the AndroidX Leanback/CarApp/Wear/WearTiles form-factor groups move into the AndroidX block ahead of Navigation/ Collection. No versions or package memberships change. Also remove the duplicate "Uno.WinUI.Svg" entry in the Core group (it had crept back in via an older bundled SDK snapshot). Mirror the same ordering in the generated ReadMe (src/Uno.Sdk/ReadMe.md): its embedded packages.json block now matches the manifest, and the MSBuild property table reorders the Android form-factor rows to match. The Uno.Sdk.Updater ReadMe template is reordered the same way so future regenerations stay consistent. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Tick the box to add this pull request to the merge queue (same as
|
This was referenced Sep 3, 2026
This was referenced Sep 14, 2026
This was referenced Sep 21, 2026
This was referenced Oct 8, 2026
This was referenced Oct 19, 2026
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds three new opt-in checkboxes to the
unoapptemplate — Android TV, Android Auto, and Wear OS — that surface in the Studio wizard whenever the Android platform is selected. Selecting any of them stamps the corresponding manifest entries, intent filters, resources, and<UnoFeatures>flags so the generated project requires no manual Android setup to target these form factors.These opt-ins produce a single APK that targets phones plus the chosen form factor(s). The conventional Wear-only / TV-only / Auto-only standalone APK pattern remains a manual setup; documented in the corresponding feature pages of
unoplatform/uno.Related to unoplatform/uno-private#1126.
Related to unoplatform/uno-private#1327.
Related to unoplatform/uno-private#1328.
Spec
Full design documented at
specs/002-android-form-factors/spec.md.What's in this PR
Template parameters
includeAndroidTVboolparameterfalseplatformsincludesandroidincludeAndroidAutoboolparameterfalseplatformsincludesandroidincludeAndroidWearboolparameterfalseplatformsincludesandroidThree matching
computedmirror booleans (useAndroidTV,useAndroidAuto,useAndroidWear) gate the conditional resource includes.What gets stamped
AndroidManifest.xml<uses-feature>forandroid.software.leanback+android.hardware.touchscreen(TV);<uses-feature>forandroid.hardware.type.watch(Wear);<meta-data android:name="com.google.android.gms.car.application">inside<application>(Auto). Allrequired="false"so the same APK installs on phones too.MainActivity.Android.cs[IntentFilter]withCategoryLeanbackLauncher(TV).Main.Android.cs[assembly: UsesFeature]attributes (TV) + conditionalBanner = "@drawable/banner"on the[ApplicationAttribute].MyExtensionsApp.1.csproj<UnoFeatures>entries (AndroidTV,AndroidAuto,AndroidWear) soUno.Sdkresolves the right AndroidX packages.Resources/drawable-xhdpi/banner.pngResources/values/Styles.AndroidTV.xmlcolorControlHighlightoverride (TV).Resources/xml/automotive_app_desc.xml<automotiveApp><uses name="media" /></automotiveApp>(Auto).Wizard wiring
TemplateWizard.jsongets a new Android form factorsMultiSelectblock under the existing Platforms screen, plus icon metadata for the three new symbols (referencing assets that ship inunoplatform/uno.studio). The three flags are also added toExportableSymbolsso they round-trip through thedotnet newcommand preview.Merge order (across repos)
unoplatform/uno(PR #23157) — SDK plumbing + docs ← must merge + ship firstunoplatform/uno.templates← this PR (template stamping for new projects)unoplatform/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 pack src/Uno.Templates/Uno.Templates.csprojproduces a valid template package.dotnet new install <packed nupkg>succeeds.dotnet new unoapp -o TVApp -platforms android --include-android-tv truegenerates a project with:uses-featureinAndroidManifest.xml[IntentFilter]withCategoryLeanbackLauncherinMainActivity.Android.cs[UsesFeature]attrs andBanner = "@drawable/banner"inMain.Android.csbanner.pngunderdrawable-xhdpi/andStyles.AndroidTV.xmlundervalues/AndroidTV;in<UnoFeatures>--include-android-auto true(verifiesautomotive_app_desc.xml+ manifest meta-data +AndroidAuto;UnoFeature).--include-android-wear true(verifies the watchuses-feature+AndroidWear;UnoFeature).dotnet build TVApp/TVApp -f net10.0-androidsucceeds end-to-end (requires the new Uno.Sdk from PR #23157).🤖 Generated with Claude Code