跳到正文
DEV Community· Mohamed Tahiri·· 4 小時前AI 評分50

AI Launcher for Android 開發復盤:自動化檢查通過,黑底黑字時鐘仍不可讀

My automated checks passed on a black-on-black clock

AI 導讀

Mohamed Tahiri 分享開發 Android 開源主畫面 AI Launcher 的經驗:自動化檢查全部通過,時鐘仍因黑底黑字而無法閲讀,只有截圖揭示問題。

正文

I built AI Launcher for Android, an open-source home screen made to be changed by an AI coding agent. You describe what you want, and the agent edits the code, installs it on your phone and checks the result. Claude Code wrote most of the code, while I directed it and tested on real phones.

The glass style on a real phone: the long-press menu, dragging an icon, app groups and search

Getting the code written was the easy part. The hard part was letting an agent know whether its work was any good. Here's what I learned.

Passing checks don't mean it looks right

One launcher passed every automated check: it installed, it didn't crash, and the clock was on the screen. But the clock was black on a black background, so nobody could read it.

Only a screenshot caught that. So the project's definition of done now has two parts: the verify script passes, and the agent has looked at the screenshots.

Fresh sessions find the gaps in your docs

I knew how everything worked, and so did the session that built it. That hid the missing instructions. New agent sessions with no memory of the work showed me where the guide fell short, so I kept testing with them and fixing what they exposed.

Your tools can cause harm too

An early version of my verify script cleared the phone's logs so it could look for new crashes. That's someone else's data on someone else's phone, so I fixed it. If a script runs on a user's device, it should leave things as it found them.

The strangest bug

The glass style sometimes opened on the wrong page, and force-stopping the app didn't help until the next touch.

Key input, including adb shell input text, a keyboard or a D-pad, puts Android in non-touch mode. Android then moved focus to a page that was composed but off-screen, and the pager scrolled to it. The fix was to stop composing off-screen pages with beyondViewportPageCount = 0. I only tested this with simulated key input, not a real keyboard or remote.

Try it

It's only been tested on two Samsung phones with Claude Code on Linux. There's no APK yet, so you need a computer and a coding agent. Reports from other phones and agents would really help:

https://github.com/MedTahiri/ai-launcher-android

來源:DEV Community · dev.to