p.enthalabs

GitHub - navidseyedain/ALSTMobile: Real-time Android screen translation. Powered by Gemini AI for smart multimodal vision and Google ML Kit for full offline sup

![Image 1: ALST Logo](https://github.com/navidseyedain/ALSTMobile/blob/main/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp)

📱 ALST — AI Live Screen Translation

[](https://github.com/navidseyedain/ALSTMobile#-alst--ai-live-screen-translation) **Real-time, in-place visual screen translation for Android powered by Google's Gemini 3.6 Flash & ML Kit.**

![Image 2: Latest Release](https://github.com/navidseyedain/ALSTMobile/releases/latest)![Image 3: Download APK](https://github.com/navidseyedain/ALSTMobile/releases/download/v1.0.0/ALST-v1.0.0.apk)![Image 4: GitHub Stars](https://github.com/navidseyedain/ALSTMobile/stargazers)![Image 5: Forks](https://github.com/navidseyedain/ALSTMobile/network/members)![Image 6: Android Support](https://camo.githubusercontent.com/c1fec3e7450a39de063145bcc8667fed023d88720f7c75a2b1b09dfbad3b6da3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f416e64726f69642d41504925323032362532302e2e25323033352d3344444338343f7374796c653d666f722d7468652d6261646765266c6f676f3d616e64726f6964266c6f676f436f6c6f723d7768697465)![Image 7: Gemini AI](https://camo.githubusercontent.com/4151855ec9748a42c2e383052f5c23ea39d54e8de031c3d4530be28d9bea7c98/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f776572656425323042792d47656d696e69253230332e36253230466c6173682d3030433839363f7374796c653d666f722d7468652d6261646765266c6f676f3d676f6f676c65266c6f676f436f6c6f723d7768697465)![Image 8: MIT License](https://github.com/navidseyedain/ALSTMobile/blob/main/LICENSE)

![Image 9: Direct Download APK](https://github.com/navidseyedain/ALSTMobile/releases/download/v1.0.0/ALST-v1.0.0.apk)

**Translate any game, comic, chat, or foreign UI in real-time.**

_Zero telemetry. No subscriptions. 100% Free & Open-Source._

![Image 10: ALST Live Screen Translation Demo](https://github.com/navidseyedain/ALSTMobile/blob/main/docs/demo.gif)

- * *

📑 Table of Contents

[](https://github.com/navidseyedain/ALSTMobile#-table-of-contents)

- 🌍 What is ALST?

- ✨ Key Features

- 📸 Screenshots & Visual Tour

- 🔬 How It Works (Architecture)

- 📊 Feature Comparison

- 🛠 Tech Stack & Dependencies

- 📂 Project Architecture

- 🔒 Privacy & Security

- 🚀 Quick Start & Installation

- 🗺 Roadmap

- 🤝 Contributing

- 📄 License

- 👤 Author

- * *

🌍 What is ALST?

[](https://github.com/navidseyedain/ALSTMobile#-what-is-alst)

**ALST (AI Live Screen Translation)** is an open-source Android utility that eliminates language barriers across all applications on your phone. Operating seamlessly via a non-intrusive floating overlay, ALST captures your active screen using hardware-accelerated `MediaProjection`, processes text using **Gemini 3.6 Flash's multimodal vision model**, and dynamically renders accurate translations directly over the original text coordinates using Android's `WindowManager`.

Whether you are playing untranslated foreign mobile games, reading raw Webtoons/Manga, chatting on messaging apps, or browsing international news, ALST provides an instant, contextual, and immersive reading experience without switching apps or taking manual screenshots.

> ### 💡 Primary Use Cases: > > [](https://github.com/navidseyedain/ALSTMobile#-primary-use-cases) > * 🎮 **Gaming**: Play Japanese/Korean RPGs and mobile titles with live dialog and menu overlays. > * 📖 **Comics & Manga**: Read webtoons, manhwa, and manga without waiting for scanlation groups. > * 💬 **Live Messaging**: Chat across WhatsApp, Telegram, or WeChat with instant auto-translation. > * 📰 **Global News & Research**: Read international apps and documents with full RTL/LTR script rendering.

- * *

✨ Key Features

[](https://github.com/navidseyedain/ALSTMobile#-key-features)

⚡ Single-Pass Multimodal Translation (Gemini 3.6 Flash)

[](https://github.com/navidseyedain/ALSTMobile#-single-pass-multimodal-translation-gemini-36-flash)

- **Zero OCR Bottlenecks**: Directly analyzes the raw screen frame buffer with Google's latest multimodal vision AI.

- **Context-Aware Semantic Understanding**: Understands idioms, slang, gaming terminology, and multi-line paragraph flows rather than translating words in isolation.

- **Auto Source Language Detection**: Simultaneously detects and translates mixed-language screens (e.g., Persian + English + Japanese) in a single API call.

- **Pixel-Accurate Coordinate Mapping**: Calculates normalized spatial bounding boxes to place translations exactly over the original text.

📴 Offline Resilience (Google ML Kit)

[](https://github.com/navidseyedain/ALSTMobile#-offline-resilience-google-ml-kit)

- Completely local, on-device OCR and neural translation for Latin-based languages when traveling or off-grid.

- Dynamic language model manager with live sync and download status.

🎯 Floating Action Button (FAB) & Instant Overlay

[](https://github.com/navidseyedain/ALSTMobile#-floating-action-button-fab--instant-overlay)

- **Draggable Frosted Glass FAB**: Move the trigger anywhere along your screen edges.

- **Quick Dismissal**: One-tap dismiss on any translation block, with auto-timeout safeguards (30s) to prevent screen obstruction.

- **Subtle Close Controller**: Long-press to reveal the dedicated mini close button to gracefully stop the background service.

- **Quick Settings Tile**: Start and stop the translation engine directly from Android's status bar / quick settings drop-down.

🔋 Battery & Memory Engineered

[](https://github.com/navidseyedain/ALSTMobile#-battery--memory-engineered)

- **Frame Throttling (300ms)**: Eliminates continuous GPU/CPU rendering cycles.

- **Memory Recycling**: Zero bitmap accumulation via reusable frame buffers and strict `ImageReader` lifecycle closures.

- **Android 14 Ready**: Fully compliant with `FOREGROUND_SERVICE_MEDIA_PROJECTION` requirements and graceful system UI disconnect callbacks.

- * *

📸 Screenshots & Visual Tour

[](https://github.com/navidseyedain/ALSTMobile#-screenshots--visual-tour)

🎨 Cyber-Glassmorphic Dashboard

[](https://github.com/navidseyedain/ALSTMobile#-cyber-glassmorphic-dashboard)

🌐 Real-Time In-Place Translation Showcase (4 Languages)

[](https://github.com/navidseyedain/ALSTMobile#-real-time-in-place-translation-showcase-4-languages) ALST translates raw screen text while preserving the layout, fonts, and spatial positioning:

⚡ Floating Controls & Quick Settings Integration

[](https://github.com/navidseyedain/ALSTMobile#-floating-controls--quick-settings-integration)

- * *

🔬 How It Works (Architecture)

[](https://github.com/navidseyedain/ALSTMobile#-how-it-works-architecture)Loading

flowchart TD A[User Taps Floating FAB] -->|Trigger Signal| B[ScreenTranslatorService] B -->|Request Frame| C[ScreenCaptureManager] C -->|MediaProjection + VirtualDisplay| D[ImageReader Frame Buffer] D -->|Throttle: 300ms| E{Active Engine Type}

%% Online Route E -->|Online Mode| F[Gemini 3.6 Flash API] F -->|Multimodal Vision Prompt| G[JSON Parser & Markdown Sanitizer] G -->|Extract Normalized Bounding Boxes + Text| H[OverlayManager]

%% Offline Route E -->|Offline Mode| I[ML Kit TextRecognition] I -->|Bounding Rects| J[ML Kit On-Device Translate] J -->|Translated Blocks| H

%% Render H -->|Calculate Screen Insets & Density| K[Jetpack Compose Overlay View] K -->|WindowManager.addView| L[Screen Translation Canvas Displayed] L -->|Tap Overlay / 30s Timeout| M[Clean Dismiss & Recycle Bitmaps]

- * *

📊 Feature Comparison

[](https://github.com/navidseyedain/ALSTMobile#-feature-comparison) | Feature | ALST (This Project) | Google Lens / Translate App | Typical Screen Translators | | --- | --- | --- | --- | | **Engine** | **Gemini 3.6 Flash + ML Kit** | Google Translate | Basic Tesseract OCR | | **Contextual Accuracy** | 🟢 **Ultra High (LLM-grade)** | 🟡 Medium | 🔴 Low (Literal) | | **Multimodal Single-Pass** | 🟢 **Yes (Vision AI)** | 🔴 No (Chained OCR+API) | 🔴 No | | **Mixed Language Screens** | 🟢 **Native Auto-Detect** | 🟡 Single Source Only | 🔴 Single Source Only | | **Overlay Placement** | 🟢 **In-place Spatial Matching** | 🔴 Full Screen Freeze/Card | 🟡 Floating Card | | **Privacy & Telemetry** | 🟢 **Zero Telemetry / BYOK** | 🔴 High Telemetry | 🔴 Heavy Ads & Trackers | | **Open Source** | 🟢 **100% Free & MIT Licensed** | 🔴 Proprietary | 🔴 Freemium / Paid |

- * *

🛠 Tech Stack & Dependencies

[](https://github.com/navidseyedain/ALSTMobile#-tech-stack--dependencies)

- **Core & Architecture**:

- **Language**: Kotlin 2.0+

- **UI System**: Jetpack Compose (Material 3)

- **Architecture**: Clean MVVM (Model-View-ViewModel) + Repository Pattern

- **Async / Reactive**: Kotlin Coroutines & Reactive `StateFlow` / `SharedFlow`

- **Dependency Injection**: Factory Pattern & Lifecycle-aware scopes

- **Android APIs**:

- **Screen Capture**: Android `MediaProjection`, `VirtualDisplay`, `ImageReader`

- **System UI**: `WindowManager` (`TYPE_APPLICATION_OVERLAY`), `TileService`

- **Storage**: `Jetpack DataStore (Preferences)`

- **AI & Machine Learning**:

- **Cloud LLM**: Google GenAI SDK (`gemini-3.6-flash`)

- **On-Device ML**: Google ML Kit (`text-recognition`, `translate`, `language-id`)

- * *

📂 Project Architecture

[](https://github.com/navidseyedain/ALSTMobile#-project-architecture)

``` ALSTMobile/ ├── app/ │ ├── src/main/ │ │ ├── java/com/alst/mobile/ │ │ │ ├── core/ │ │ │ │ ├── capture/ # MediaProjection & screen capture pipeline │ │ │ │ ├── ocr/ # ML Kit local text detection │ │ │ │ ├── overlay/ # WindowManager floating overlays & FAB │ │ │ │ └── translator/ # Gemini 3.6 Flash & ML Kit engine abstraction │ │ │ ├── data/ │ │ │ │ └── preferences/ # DataStore local settings repository │ │ │ ├── domain/ │ │ │ │ └── model/ # TranslationBlock, EngineType, Language models │ │ │ ├── service/ # Foreground translation & Quick Settings tile services │ │ │ └── ui/ │ │ │ ├── dashboard/ # Compose Glassmorphic dashboard & sheets │ │ │ └── theme/ # Cyber-dark theme, gradients, typography │ │ ├── res/ # Drawables, mipmaps, strings │ │ └── AndroidManifest.xml # Android 14 compliant permissions & services │ └── build.gradle.kts ├── docs/ # Screenshots, demo GIF, and media assets ├── gradle/ ├── README.md ├── README-fa.md └── LICENSE ```

- * *

🔒 Privacy & Security

[](https://github.com/navidseyedain/ALSTMobile#-privacy--security)

- **Bring Your Own Key (BYOK)**: ALST connects directly from your device to Google AI Studio's API endpoint. There is no middleman, proxy server, or custom backend.

- **Local Credential Storage**: Your Gemini API Key is stored securely on your device's private sandboxed DataStore storage.

- **No Analytics / Telemetry**: No tracking SDKs (Firebase Analytics, Crashlytics, Mixpanel, etc.) are included in the build.

- **Zero Retention**: Screen buffers are processed strictly in RAM and discarded immediately after rendering.

- * *

🚀 Quick Start & Installation

[](https://github.com/navidseyedain/ALSTMobile#-quick-start--installation)

📲 Option 1: Install Pre-built APK (Recommended)

[](https://github.com/navidseyedain/ALSTMobile#-option-1-install-pre-built-apk-recommended) 1. Download the latest release from Releases or click Direct APK Download (v1.0.0). 2. Install the `.apk` file on your Android device (ensure "Install from unknown sources" is allowed).

🛠 Option 2: Build from Source

[](https://github.com/navidseyedain/ALSTMobile#-option-2-build-from-source) #### Prerequisites

[](https://github.com/navidseyedain/ALSTMobile#prerequisites)

- **Android Studio** (Koala | Ladybug or newer recommended)

- **JDK**: Version 17

- **Device / Emulator**: Android 8.0 (API Level 26) up to Android 15 (API Level 35)

#### Build & Run

[](https://github.com/navidseyedain/ALSTMobile#build--run)

1. Clone the repository

git clone https://github.com/navidseyedain/ALSTMobile.git

2. Navigate to project root

cd ALSTMobile

3. Build debug APK using the included Gradle wrapper

./gradlew assembleDebug

Setup Gemini API Key

[](https://github.com/navidseyedain/ALSTMobile#setup-gemini-api-key) 1. Generate a free API key from Google AI Studio. 2. Launch the **ALST** app on your phone. 3. Paste the key in the **Gemini API Key** card and tap **Save**. 4. Grant **Overlay Permission** and tap the **Master Power Switch** to start translating!

- * *

🗺 Roadmap

[](https://github.com/navidseyedain/ALSTMobile#-roadmap)

- Multimodal single-pass translation via Gemini 3.6 Flash

- Offline local translation fallback via Google ML Kit

- Floating draggable FAB with gesture support & instant dismiss

- Glassmorphic Material 3 Dashboard with ambient blur

- Android 14 `MediaProjection` foreground service compliance

- Quick Settings Tile integration

- **Interactive Box Selection**: Drag to translate a specific rectangular screen region

- **Text-to-Speech (TTS)**: Listen to translated blocks aloud with native voices

- **History & Export**: Save translated snippets directly to markdown or clipboard

- * *

🤝 Contributing

[](https://github.com/navidseyedain/ALSTMobile#-contributing) Contributions are what make the open-source community an incredible place to learn, inspire, and create. Any contributions you make are **greatly appreciated**!

1. Fork the Project 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) 3. Commit your Changes (`git commit -m 'feat: Add some AmazingFeature'`) 4. Push to the Branch (`git push origin feature/AmazingFeature`) 5. Open a Pull Request

- * *

📄 License

[](https://github.com/navidseyedain/ALSTMobile#-license) Distributed under the **MIT License**. See `LICENSE` for more information.

- * *

👤 Author

[](https://github.com/navidseyedain/ALSTMobile#-author) **Navid Seyedain**

- GitHub: @navidseyedain

- Projects: ALAD (AI Live Audio Dubbing) | ALST Mobile

Built with ❤️ using Kotlin & Jetpack Compose