Files
poli0981andClaude Opus 5.5 a22589a334 fix(android): keep the app clear of the status and navigation bars
targetSdk 36 and MainActivity's enableEdgeToEdge() draw the webview under
both system bars. The React 1.x shell padded all four safe-area insets; the
SvelteKit rewrite kept only <main>'s bottom one, so the top bar of every 2.x
app has sat under the clock, which docs/android-support.md says cannot happen.

- styles/theme.css gains pt-safe, pb-safe, pl-safe, pr-safe and p-safe-or-4
  (env(safe-area-inset-*), named after the tailwindcss-safe-area classes).
  The shell root carries pt-safe pl-safe pr-safe, <main> pb-safe, the drawer
  pt-safe pb-safe pl-safe, and /welcome and the /error pages, which have no
  shell, pad themselves.
- The consent gate and the human check use p-safe-or-4 and centre their card
  with m-auto instead of items-center: on a short phone a card taller than
  the screen lost its top, unreachable (measured at 360x520: the 620px
  consent card now scrolls from its top edge).
- Back-to-top and the toasts add the bottom inset; the never-expiring Android
  update toast sat on the gesture bar.
- The status-bar icons follow the SYSTEM theme (enableEdgeToEdge() uses
  SystemBarStyle.auto), but the app defaults to dark, so a phone in light
  mode showed dark icons on a dark page. In the Android app the layout now
  puts a status-bar-strip behind them, keyed on prefers-color-scheme and
  never on the reader's theme. Its two colours are theme.css's --background
  tokens; mobile-layout.test.ts compares them and holds the shell padding.

env() reports these insets only from Android System WebView 136; an older
WebView reads 0 and keeps today's look. The Android docs now say so, and the
themes.xml comments, which still pointed at the React Layout and claimed
light icons, describe what enableEdgeToEdge() actually does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 06:42:01 +07:00

5.1 KiB
Raw Permalink Blame History

Hỗ trợ Android & yêu cầu hệ thống

Bản tiếng Anh ở ../../android-support.md.

File này giải thích phiên bản Android tối thiểu mà APK F2P Tracker yêu cầu, lý do, và những gì đã được test. Số liệu đều có nguồn để bạn tự kiểm chứng.

Yêu cầu tối thiểu

Tối thiểu Android 11 (API 30) trở lên
Target / compile Android 16 (API 36)
CPU/ABI APK universal — arm64-v8a, armeabi-v7a, x86, x86_64

APK khai báo minSdkVersion 30. Trên máy cũ hơn Android 11, trình cài đặt của Android từ chối cài (INSTALL_FAILED_OLDER_SDK) và báo "App not installed" / "cần phiên bản Android mới hơn". Đây là cơ chế do chính OS thực thi — không có cách bypass trong app — nên ngưỡng phiên bản cũng chính là cổng chặn cài đặt. (Đặt tại gen/android/app/build.gradle.kts → minSdk = 30.)

Vì sao Android 11+

  1. Bảo mật / hết vòng đời (EOL). Google chỉ vá bảo mật OS cho các bản mới nhất. Tính đến 06/2026, chỉ còn Android 14, 15 và 16 — Android 13 rời các security bulletin khoảng 03/2026, Android 12/12L ngày 31/03/2025, còn Android 11 trở về trước thì đã EOL từ lâu. Chọn ngưỡng 11 thay vì 14 là cân bằng có chủ đích: bỏ phần đuôi chết hẳn (Android 7–10) mà vẫn phủ lượng lớn người dùng đang ở 11–13. Lưu ý: Android 11–13 không còn nhận bản vá bảo mật OS từ Google, dù vẫn cài được app.
  2. Tương thích WebView. App là lớp vỏ native mỏng bọc UI web; mọi thứ render trong Android System WebView (Chromium). Các bản Android cũ thường mang WebView lỗi thời, dễ vỡ với output ES2022 / Svelte 5 của bản build Vite 8 / Rolldown. Ngưỡng OS cao hơn nâng nền Chromium tối thiểu và giảm rủi ro này. (WebView tự cập nhật độc lập qua Play Store, nên ai giữ nó mới thì ổn hơn — nhưng không thể trông cậy điều đó trên máy đã EOL.)
  3. Edge-to-edge & safe area. Ta compile với targetSdk 36 (Android 16), buộc layout edge-to-edge; UI dùng env(safe-area-inset-*) để né thanh status / gesture-nav. Những hành vi này ổn định nhất trên Android 11+. WebView chỉ báo các inset này từ Android System WebView 136; với bản cũ hơn, thanh trên cùng sẽ nằm dưới thanh trạng thái, và cập nhật "Android System WebView" qua Play Store là khắc phục được.
  4. Phạm vi test. Ta chỉ test từ Android 11 trở lên (xem dưới); không muốn ship một ngưỡng không thể smoke-test.

Thiết bị đã test

Loại Thiết bị / target Phiên bản Android
Emulator Android Studio AVD Android 11 → 16 (API 30–36)
Máy thật vivo 1907 Android 12 (API 31)

Dưới Android 11 là không hỗ trợ và bị chặn ngay khi cài. Trên ngưỡng đó dự kiến chạy được nhưng là best-effort ngoài ma trận trên. Gặp lỗi? Mở bug report kèm thiết bị + phiên bản Android + screenshot.

Bức tranh phiên bản Android (dữ liệu đằng sau quyết định)

Thị phần & trạng thái hỗ trợ bảo mật của các phiên bản Android toàn cầu, giữa 2026:

Android API Google còn vá bảo mật OS? Thị phần (StatCounter, 5/2026) Tích luỹ (bản này trở lên)
16 (Baklava) 36 ✅ còn 23.1% 22.3%
15 35 ✅ còn 18.1% 41.0%
14 34 ✅ còn 13.0% 54.5%
13 33 ❌ EOL ~3/2026 14.3% 68.9%
12 / 12L 31 / 32 ❌ EOL 31/3/2025 10.0% 78.8%
11 30 ❌ EOL ~2023 7.9% 86.9%
10 trở về trước ≤ 29 ❌ phần còn lại —

Vậy ngưỡng minSdk 30 phủ khoảng 87% thiết bị Android đang hoạt động mà chỉ bỏ phần đuôi đã chết.

Nguồn

Liên quan