Fish Live Wallpaper 4K · v3.0

Keyboard Themes — Live Spec

Chức năng cài đặt theme bàn phím từ app: danh sách theme, preview, apply, gate Premium qua Subscription / Watch Ads, có IME bàn phím riêng.

LIVE SPEC Mục tiêu: Tăng LTV Remote key: keyboard_theme_enable Themes: 6 (3 Free · 3 Pro)

1 Mục tiêu

  • Cho phép user cài đặt keyboard theme ngay trong app.
  • Hiển thị danh sách themes · cho preview trước khi apply · apply vào bàn phím.
  • Lưu trạng thái theme đã chọn / đã cài; phân biệt Free vs Premium.

2 Hiện trạng → Kết quả

Trước (Actual)
  • Chưa có màn list / preview keyboard theme
  • Chưa có logic apply vào bàn phím
  • Chưa phân biệt Free / Premium, chưa lưu theme
Sau (Expected) ✓
  • Màn Keyboard Themes (grid) + badge Pro + trạng thái Applied
  • Màn Preview gõ thử + nút Apply
  • IME service riêng render theme đang Applied; lưu local

3 Theme Catalog

6 theme nền ảnh thật (từ Drive). Phím dùng style frosted tối + chữ trắng để đọc rõ trên mọi ảnh.

4 Màn hình

a. Theme List
  • Liệt kê tất cả themes
  • Theme đang dùng: Applied
  • Theme khác: nút Apply
  • Premium: icon Pro 👑
b. Theme Preview
  • Xem giao diện bàn phím
  • Gõ thử vào ô preview
  • Nút Apply
c. Unlock Popup
  • Premium + chưa mua → popup
  • Watch Ads (nếu bật) / Upgrade
  • Cancel

5 Flow xử lý

  1. Tại Home, user bấm Card "Keyboard Themes" (gate bởi remote config) → mở màn Keyboard Themes.
  2. Chọn 1 theme → mở màn Preview, gõ thử.
  3. Bấm Apply. Theme Free / đã mua / đã unlock → apply ngay.
  4. Theme Premium chưa mở → popup Unlock → Watch Ads → unlock.
  5. Apply thành công → lưu theme Applied (chỉ 1 tại 1 thời điểm) → hướng dẫn bật/chọn bàn phím trong System Settings.

6 Business Logic & Remote Config

KeyDefaultMô tả
keyboard_theme_enablefalseBật/Tắt toàn bộ chức năng Keyboard Themes (ẩn/hiện Card ở Home + mục ở Settings)
keyboard_theme_watch_adstrueBật/Tắt nút Watch Ads trong popup Unlock
Apply thành công → lưu theme local, giữ qua các lần mở app. Chỉ 1 theme Applied. Apply lỗi → giữ nguyên theme hiện tại + báo lỗi.

7 Kỹ thuật

keyboard/FishKeyboardService.ktIME service (InputMethodService) — render theme Applied, đọc lại mỗi lần bật bàn phím
keyboard/KeyboardThemeView.ktBàn phím QWERTY custom; nền ảnh theme, phím frosted dùng chung IME + Preview
keyboard/KeyboardThemeRepository.kt6 theme + lưu Applied / Unlocked (SharePreference); chỉ 1 Applied
keyboard/ui/KeyboardThemesActivity.ktMàn list (grid 2 cột)
keyboard/ui/KeyboardThemePreviewActivity.ktMàn Preview + Apply + xử lý Premium/Watch Ads (reuse rewardTheme + AppPurchase)
keyboard/ui/UnlockKeyboardThemeDialog.ktPopup Unlock (Watch Ads / Upgrade / Cancel)
res/xml/method.xml + ManifestKhai báo IME (BIND_INPUT_METHOD) + 2 activity
XML/ViewBindingminSdk 26Kotlin Firebase Remote ConfigAppPurchase.isPurchasedrewardTheme (AdMob)

8 Giới hạn & Next step

  • Entry point: Card ở Home (chính) + mục ở Settings (phụ) — đều gate remote.
  • Bàn phím MVP: QWERTY + space/,/./enter. Trang số/ký tự ?123 là placeholder.
  • 4 video .mp4 từ Drive chưa dùng (chỉ lấy 6 ảnh tĩnh cho keyboard).
  • Upgrade Now: app chưa có màn Subscription → tạm hiện thông báo "coming soon".
  • Android bắt buộc user tự bật + chọn bàn phím trong System Settings (flow đã guide).