Skip to content

Explore Android XR (AI-glasses) integration#120

Draft
code418 wants to merge 1 commit into
masterfrom
claude/smart-glasses-integration-jf0kW
Draft

Explore Android XR (AI-glasses) integration#120
code418 wants to merge 1 commit into
masterfrom
claude/smart-glasses-integration-jf0kW

Conversation

@code418
Copy link
Copy Markdown
Owner

@code418 code418 commented May 15, 2026

Summary

Exploratory scaffolding for a future Android XR / AI-glasses surface
(https://developer.android.com/develop/xr/jetpack-xr-sdk/ai-glasses/build).
No behaviour ships. This PR just reserves the build harness and
records a design so the next PR can drop in a real Activity without
reshaping Gradle first.

  • New xr product flavour alongside the existing phone and wear
    flavours (minSdk 34, versionCode band +20000, versionNameSuffix "-xr").
  • New android/app/src/xr/AndroidManifest.xml — manifest-only source
    set, no activities, no services.
  • New docs/smart_glasses_integration.md — feasibility note proposing
    the Android Auto pattern as the closest template: native Kotlin +
    Compose Glimmer, direct Firestore / Functions reads, no Flutter
    engine on glasses (Jetpack XR is Kotlin/Compose only).

What's deliberately not in this PR

  • No Kotlin source under src/xr/. The xrImplementation dependency
    block in android/app/build.gradle is committed commented-out
    because the androidx.xr.* artefacts are still alpha and Google
    hasn't pinned coordinates yet.
  • No changes to lib/, functions/, firestore.rules,
    storage.rules, pubspec.yaml, firebase.json, the wear source
    set, or the phone source set.
  • No CI workflow changes.

Why the Android Auto pattern

The repo already has two non-phone surfaces:

Surface Engine Architecture
Wear OS Flutter (lib/main_wear.dart, wear flavour) Shares Dart business logic
Android Auto Native Kotlin (src/phone/.../car/, scoped to phone) Direct Firestore / Functions reads, no Flutter

Jetpack XR's AI-glasses SDK is Kotlin + Compose Glimmer only, so Wear's
Flutter-entrypoint approach doesn't apply. Android Auto's
StatsRepository.kt + ClaimAction.kt are the proven template — both
will be lifted almost verbatim in a follow-up PR.

Phased rollout (per the design doc)

  1. This PR — flavour + doc.
  2. Read-only HUD prototype (stats card, mirrors Android Auto's stat
    panel).
  3. Voice-driven claim (TTS + ASR wrapping startScoring).
  4. Live fuzzy-compass overlay (port of lib/fuzzy_compass.dart into
    Compose Glimmer, sectors only — same no-pinpointing guarantee as
    the phone).
  5. Public alpha behind a Firebase Remote Config flag.

Test plan

This PR adds no executable behaviour, so the verification is "we
haven't broken the phone or wear builds":

  • flutter analyze still reports no issues (Dart is untouched, so
    this should be a no-op).
  • flutter test still reports 105 Dart tests passing.
  • cd functions && npm test still reports 268 TypeScript tests
    passing.
  • cd android && ./gradlew tasks lists assembleXrDebug alongside
    assemblePhoneDebug and assembleWearDebug.
  • ./gradlew :app:processXrDebugManifest merges cleanly.
  • ./gradlew :app:assemblePhoneDebug --dry-run succeeds (no
    regression in the default-target build).

Opening as draft because this is future-looking exploration, not a
mergeable feature.


Generated by Claude Code

Reserves the build harness for a future Android XR (Jetpack XR / AI-
glasses) surface without shipping any behaviour. Adds an xr product
flavour (minSdk 34, versionCode band +20000) alongside the existing
phone and wear flavours, a manifest-only src/xr/ source set, and a
docs/ feasibility note that proposes mirroring the Android Auto
pattern (native Kotlin, direct Firestore reads, no Flutter engine).

The xrImplementation dependency block is committed commented-out
because the androidx.xr.* artefacts are still alpha and coordinates
are not yet pinned by Google.

No changes to lib/, functions/, security rules, pubspec, or the
phone / wear source sets.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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