Android 8.1 Support: One Yellow Warning and Two Silent Bugs
The real cost of supporting old Android devices is not the manifest number but the missing APIs and the fallback semantics you choose. A false default in a catch-all can quietly break features for years, and the amber warning pattern is a clear way to communicate capability loss without a false red alert.
Dropping an Android app's minimum SDK from 30 to 27 is not a one-line manifest change. Andee, an agent that lives inside an Android phone using accessibility services to read and tap the screen, now runs on Android 8.1, but the downgrade forces a different answer for screen capture. takeScreenshot only exists on API 30, so on older versions the function returns null, deliberately sharing the same failure value as a denied capture. The model can't tell "system too old" from "permission revoked", but the UI layer avoids a separate code path at the cost of that ambiguity.
The self-check now opens with an amber warning that lists which features are missing (screen capture, image tap, window frosted glass) and which still work (chat, voice, notes, settings), with no fix button. To clean up the scattered API-30-only calls, twelve UI files were refactored to ask a central WindowMetricsCompat object, but the geometry rewrite introduced a bug: several metrics already exclude the status bar, and subtracting it again made the floating ball and centered cards sit one status bar too low. The other silent bug came from the exact-alarm permission check, which used runCatching with a default of false. Since canScheduleExactAlarms() is API 31, Android 11 invocations threw, and the fallback made all reminders silently allowed to be late. The fix short-circuits to true for SDK_INT below S, because that permission never existed. Neither bug crashes, so they hide in geometry and timing deviations, reproducible only on the scarcest API 27–29 devices.
Using a single null return for both 'system too old' and 'permission denied' simplifies the UI but erases a meaningful distinction for the model's debugging; the author accepts that trade-off to keep the failure path uniform.
The double subtraction of the status bar shows how a straightforward geometric formula turns into a silent bug when the coordinate spaces of two metrics APIs differ; the code was exercised only on modern devices until the minSdk drop exposed it.
The runCatching plus false default pattern is a trap: an exception from a missing API becomes a permanent wrong answer, and the only safeguard is an explicit version check that acknowledges the permission's existence across Android versions.
An amber warning that clearly separates degraded features from working ones is a more honest user-facing pattern than a red crash, because it sets expectations without blocking the parts that still function.