Skip to content

feat(wear): add native companion with phone payment refresh - #171

Closed
brill594 wants to merge 21 commits into
BenderBlog:mainfrom
brill594:main
Closed

brill594 wants to merge 21 commits into
BenderBlog:mainfrom
brill594:main

Conversation

@brill594

@brill594 brill594 commented Aug 4, 2026 •

Copy link
Copy Markdown

Add the native Kotlin/Compose Wear OS companion and the Android phone Data Layer bridge. The watch displays cached courses and experiments, offers an offline agenda Tile, and supports horizontal week navigation with vertical Monday-to-Sunday browsing.

Payment-code refresh runs through the paired phone while XDYou is open. The watch keeps a cached image when the phone is unavailable. Watch requests, listeners, and payment-code screen power follow the foreground lifecycle; no background polling is used.

This PR contains Wear OS integration only. General mobile authentication/layout fixes and Kotlin compiler alignment are submitted separately in #211.

Validation:

  • Wear assembleDebug passed locally.
  • Companion build CI runs assembleDebug.
  • Pixel Watch 5 and Android phone verified pairing preservation, schedule synchronization, and phone-backed payment-code retrieval.
  • The production Wear application code matches the device-tested version. Phone APK validation used the compiler alignment submitted in fix(auth): prevent keyboard overflow and align Kotlin compiler plugins #211.

Comment thread README.md Outdated
13. 上课前提醒。
14. 完备的国际化支持:支持繁体中文和英语。
15. 宿舍水机支持。
16. 提供配套 Wear OS 应用,可同步课程、一卡通余额与付款码,并在断开手机时使用缓存数据。

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

简化为:配套 WearOS 或 Apple Watch 应用

Comment thread README.md
Tools • Dart 3.12.0 • DevTools 2.57.0
```

### 仓库结构与 Wear OS 构建

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

单独写个文件放,别写在这里

class _WearSyncLoginPageState extends State<WearSyncLoginPage> {
late final WearCompanionSyncBridge _bridge;
StreamSubscription<WearCompanionSyncEnvelope>? _subscription;
String _status = '请在手机端打开“设置 > XDYou Wear”,选择这块手表';

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

做国际化,至少支持繁体中文

@BenderBlog

BenderBlog commented Aug 4, 2026 •

Copy link
Copy Markdown
Owner

删了那堆测试,删了二维码付款那个,删了所有 ids 逻辑,咱这个只做同步课表显示功能。
假设同步成功,但是手机退出登录咋办?
慢慢调试,我在重写网络代码,得下个月了。

@BenderBlog

Copy link
Copy Markdown
Owner

你的等我搞完 slang 再说

@BenderBlog

Copy link
Copy Markdown
Owner

最近我很忙,这么大修改我还是再放一段时间

@BenderBlog BenderBlog added the help wanted Extra attention is needed label Oct 2, 2026
@brill594

Copy link
Copy Markdown
Author

删了那堆测试,删了二维码付款那个,删了所有 ids 逻辑,咱这个只做同步课表显示功能。 假设同步成功,但是手机退出登录咋办? 慢慢调试,我在重写网络代码,得下个月了。

二维码付款是需求,我就课表同步和二维码;

@brill594 brill594 changed the title feat(wear): integrate Wear OS companion app into monorepo feat(wear): add native companion with phone payment refresh Oct 11, 2026
@brill594 brill594 closed this Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants