In‑Place Android Screen Translator (ALST)
Описание и применение
ALST — это приложение для Android, которое переводит любой экран в реальном времени, отображая переведённый текст поверх оригинального контента без выхода из приложения. Использует Gemini 3.6 Flash для облачного перевода и ML Kit для офлайн‑работы, обеспечивает управление памятью и интеграцию с системными элементами.
Задача
Mobile users struggle with language barriers because existing screen‑translation tools require screenshots, freeze screens, or overlay blocking text cards.
Результат
ALST delivers seamless, real‑time translation directly over app content, improving contextual accuracy with Gemini and maintaining 100% offline capability via ML Kit, all while preventing memory leaks on Android 14+.
Рабочий процесс
- 1. Capture screen frames via MediaProjection and ImageReader
- 2. Send bitmap to Gemini 3.6 Flash (cloud) or ML Kit OCR (offline)
- 3. Receive translated text and bounding boxes
- 4. Scale coordinates to device density and insets
- 5. Render glassmorphic overlay cards with Compose Canvas
- 6. Provide Quick Settings tile and floating FAB for quick activation
Доказательства
ALST is built following Clean Architecture and MVVM/MVI design patterns.
Gemini extracts the text, understands local context/idioms, and returns both the translated text and exact bounding box coordinates (Rect).
Capturing raw 1440p / 4K screen frames produces bitmaps that consume over 15MB–20MB of RAM per frame.
- Дата записи: 2026-09-08T17:46:26.639Z