Skip to content

Repository files navigation


SwiftSlate Icon

SwiftSlate

System-wide AI text assistant for Android โ€” powered by Gemini, Groq, and any OpenAI-compatible endpoint

Type a trigger like ?fix at the end of any text, in any app, and watch it get replaced โ€” instantly.


Android Kotlin Gemini License: MIT

Latest Release Downloads F-Droid GitHub Stars APK Size Build


Musheer360/SwiftSlate | Trendshift Musheer360/SwiftSlate | Trendshift Musheer360/SwiftSlate | Trendshift


Download APK ย ย  Report Bug ย ย  Request Feature


Note

SwiftSlate works in most apps โ€” WhatsApp, Gmail, Twitter/X, Messages, Notes, and more. No copy-pasting. No app switching. Just type and go. Some apps with custom input fields may not be supported (see limitations).

Tip

Looking for the Windows version? Check out SwiftSlate Desktop โ€” same concept, works system-wide on Windows 10/11.


๐Ÿ“‹ Table of Contents


โšก Quick Demo

๐Ÿ“  You type       โ†’  "i dont no whats hapening ?fix"
โณ  You see        โ†’  "i dont no whats hapening โ—"  (spinner animates)
โœ…  Result         โ†’  "I don't know what's happening."
๐Ÿ“  You type       โ†’  "hey can u send me that file ?formal"
โณ  You see        โ†’  "hey can u send me that file โ—"  (spinner animates)
โœ…  Result         โ†’  "Could you please share the file at your earliest convenience?"
๐Ÿ“  You type       โ†’  "Hello, how are you? ?translate:es"
โณ  You see        โ†’  "Hello, how are you? โ—"  (spinner animates)
โœ…  Result         โ†’  "Hola, ยฟcรณmo estรกs?"

โœจ Features

๐ŸŒ Works Almost Everywhere

Integrates at the system level via Android's Accessibility Service. Works in most apps โ€” messaging, email, social media, notes, browsers, and more. Some apps with custom input fields may not be supported (see limitations).

โœ‚๏ธ Text-Selection Menu

Select any text, tap SwiftSlate in the Copy/Share popup, and pick a command โ€” no accessibility permission required. Works in any app that offers Android's text-selection menu, including apps the accessibility flow can't reach.

โšก Instant Inline Replacement

Type, trigger, done. The AI response replaces your text directly in the same field โ€” no copy-pasting, no app switching. While processing, an animated spinner appends to your text (e.g., how r u โ—) so you always see progress. Text replacer commands execute instantly.

๐Ÿ”‘ Multi-Key Rotation

Add multiple API keys for automatic round-robin rotation. If one key hits a rate limit, SwiftSlate seamlessly switches to the next.

๐ŸŒ™ AMOLED Dark Theme

Pure black (#000000) Material 3 interface designed for OLED screens โ€” saves battery and looks stunning. Light theme also included.

๐Ÿค– Multi-Provider AI

Ships with Google Gemini, Groq, or connect any OpenAI-compatible endpoint โ€” cloud providers, or local LLMs like Ollama, LM Studio, and others running on your network.

๐Ÿ› ๏ธ Two Command Types

AI commands send text to your provider for intelligent transformation. Text replacer commands run entirely offline for instant local text manipulation โ€” no API key needed.

๐Ÿ”’ Encrypted Key Storage

API keys are encrypted with AES-256-GCM using the Android Keystore before being written to disk โ€” they never leave your device unencrypted.

๐ŸŒ Localized in 40 Languages

The UI ships in 40 languages and automatically follows your device's language, falling back to English when a translation isn't available.

๐Ÿšซ Zero Analytics

No telemetry, no tracking, no crash reporting โ€” text is sent only to your configured AI provider, never anywhere else.


๐Ÿงฉ Built-in Commands

SwiftSlate ships with 9 AI-powered commands, dynamic translation, and 5 built-in local commands โ€” ready to use out of the box. The AI commands are seeded as editable entries, so you can reword or delete any of them:

Trigger Action Example
?fix Fix grammar, spelling & punctuation i dont no whats hapening โ†’ I don't know what's happening.
?improve Improve clarity and readability The thing is not working good โ†’ The feature isn't functioning properly.
?shorten Shorten while keeping meaning I wanted to let you know that I will not be able to attend the meeting tomorrow โ†’ I can't attend tomorrow's meeting.
?expand Expand with more detail Meeting postponed โ†’ The meeting has been postponed to a later date. We will share the updated schedule soon.
?formal Rewrite in professional tone hey can u send me that file โ†’ Could you please share the file at your earliest convenience?
?casual Rewrite in friendly tone Please confirm your attendance at the event โ†’ Hey, you coming to the event? Let me know!
?emoji Add relevant emojis I love this new feature โ†’ I love this new feature! ๐ŸŽ‰โค๏ธโœจ
?human Humanize AI-generated text I hope this email finds you well. I wanted to delve into... โ†’ Hope you're doing well. I wanted to dig into...
?reply Generate a contextual reply Do you want to grab lunch tomorrow? โ†’ Sure, I'd love to! What time works for you?
?undo Restore text from before the last replacement Reverts to your original text before AI modified it
?translate:XX Translate to any language Hello, how are you? ?translate:es โ†’ Hola, ยฟcรณmo estรกs?
๐ŸŒ Supported language codes for translation

Use any standard language code with ?translate:XX:

Code Language Code Language Code Language
es Spanish fr French de German
ja Japanese ko Korean zh Chinese
hi Hindi ar Arabic pt Portuguese
it Italian ru Russian nl Dutch
tr Turkish pl Polish sv Swedish

โ€ฆand many more. Any ISO 639 language code works โ€” the AI model handles it.

๐Ÿ“‹ Clipboard Commands

SwiftSlate also includes 4 clipboard commands that work entirely offline, using the real Android system clipboard:

Trigger Action Example
?copy Copy preceding text to the clipboard Hello world?copy โ†’ copies "Hello world"
?cut Cut preceding text (copy + delete) Hello world?cut โ†’ cuts "Hello world"
?paste Paste after existing text Type ?paste โ†’ appends the clipboard contents
?replace Replace all text with clipboard content Type ?replace โ†’ replaces field content with the clipboard contents

Note

?paste and ?replace work with anything you've copied, in any app. Since Android 10, an accessibility service can't read the clipboard (only the focused app and the active keyboard can), so SwiftSlate doesn't try โ€” it asks the text field itself to paste, which the app performs under its own focus. If a field ignores that request, SwiftSlate falls back to the last text you copied with ?copy or ?cut.


๐Ÿ› ๏ธ Text Replacer Commands

Beyond AI, you can create text replacer commands that run entirely offline โ€” no API key, no network, instant execution:

Use Case Trigger Replacement Result
Signatures ?sig โ€” John Doe, CEO Appends your signature
Canned responses ?ty Thank you for reaching out! I'll get back to you shortly. Instant reply template
Snippets ?addr 123 Main St, Springfield, IL 62701 Quick address insertion
Shortcuts ?email contact@example.com Fast email insertion

Tip

Text replacer commands execute instantly with zero latency โ€” no spinner, no network call. Create them in the Commands tab by selecting the "Text Replacer" type.


๐Ÿค– Supported AI Providers

Provider Models Notes
Google Gemini (default) gemini-3.5-flash-lite (default), gemini-3.6-flash Free tier available at aistudio.google.com
Groq openai/gpt-oss-120b (default), qwen/qwen3.6-27b Free tier at console.groq.com
Custom (OpenAI-compatible) Any model your endpoint supports Works with Ollama, LM Studio, vLLM, any /v1/chat/completions endpoint

Tip

For local LLMs, set the endpoint to your machine's local address (e.g., http://localhost:11434/v1 for Ollama). HTTP is allowed for localhost, 127.0.0.1, and 10.0.2.2.


๐Ÿš€ Getting Started

Prerequisites

Requirement Details
Android Device Android 6.0+ (API 23 or higher)
API Key Free Gemini key at aistudio.google.com, or a key from Groq / any OpenAI-compatible provider. Not required for text replacer commands.

Installation

Tip

The APK is only ~1.4 MB โ€” lightweight with zero external dependencies for networking or JSON.

Option 1 โ€” F-Droid:

Get it on F-Droid

Option 2 โ€” GitHub Releases:

1. Download the latest APK from the Releases page

2. Install the APK on your device (allow installation from unknown sources if prompted)

3. Open SwiftSlate and follow the setup below

Setup in 3 Steps

Step 1

๐Ÿ”‘ Add API Key

Open the Keys tab, enter your API key. It's validated before saving. Add multiple keys for rotation.

Step 2

โ™ฟ Enable Service

On the Dashboard, tap "Enable" โ†’ find "SwiftSlate Assistant" in Accessibility Settings โ†’ toggle it on.

Step 3

โœ๏ธ Start Typing!

Open any app, type your text, add a trigger like ?fix at the end, and watch the magic happen.


โš™๏ธ How It Works

flowchart TD
    A["๐Ÿ“ You type: 'Hello wrld, how r u ?fix'"] --> B{"๐Ÿ” Accessibility Service\ndetects trigger"}
    B -- "Text Replacer" --> C["โšก Instant local replacement\n(no network call)"]
    B -- "AI Command" --> D["๐Ÿ”‘ Selects next API key\n(round-robin)"]
    D --> E["๐Ÿค– Sends text + prompt\nto AI provider"]
    E --> F["โณ Spinner appended to text\nhow r u โ— โ—“ โ—‘ โ—’"]
    F --> G["โœ… Replaces text in-place"]
    C --> G

    style A fill:#1a1a2e,stroke:#e94560,color:#fff
    style B fill:#1a1a2e,stroke:#0f3460,color:#fff
    style C fill:#1a1a2e,stroke:#00b894,color:#fff
    style D fill:#1a1a2e,stroke:#0f3460,color:#fff
    style E fill:#1a1a2e,stroke:#0f3460,color:#fff
    style F fill:#1a1a2e,stroke:#e94560,color:#fff
    style G fill:#16213e,stroke:#00b894,color:#fff
Loading
๐Ÿ”ง Technical deep-dive
  1. Event Listening โ€” SwiftSlate registers an Accessibility Service that listens for TYPE_VIEW_TEXT_CHANGED events across all apps (ignoring its own UI and password fields)
  2. Fast Exit Optimization โ€” For performance, it first checks if the last character of typed text matches any known trigger's last character before doing a full scan
  3. Longest Match โ€” When a potential match is found, it searches for the longest matching trigger at the end of the text
  4. Command Routing โ€” Text replacer commands execute immediately on-device. AI commands proceed to the API call path
  5. API Call โ€” The text + prompt is sent to the configured AI provider using the next available key in the round-robin rotation
  6. Inline Spinner โ€” While waiting for the AI response, the trigger is replaced with an animated spinner appended to your original text (e.g., how r u โ—) to show progress
  7. Watchdog Timer โ€” A 120-second safety timer auto-cancels stuck processing jobs to prevent the service from becoming unresponsive
  8. Text Replacement โ€” The response replaces the original text using ACTION_SET_TEXT
  9. Fallback Strategy โ€” If ACTION_SET_TEXT fails (some apps don't support it), SwiftSlate falls back to a clipboard-based select-all + paste approach
  10. Post-Replace Verification โ€” A delayed check ensures the IME didn't clobber the replacement, re-applying if needed
  11. Bounded Responses โ€” API responses are capped at 1 MB to prevent memory issues from malformed responses

โœ‚๏ธ Text-Selection Menu

Every app that offers Android's text-selection popup (the one with Copy, Cut, Share) can show SwiftSlate as an option, whether or not the accessibility service is enabled:

  1. Select text in any app
  2. Tap SwiftSlate in the popup
  3. Pick a command
  4. Get the result back with Insert (replaces the selection in-place, when the field allows it) or Copy

It runs the same commands, requests, and errors as typing a trigger โ€” just through a one-shot dialog that closes as soon as it's done, with no new permissions. Built-in clipboard commands (?copy, ?cut, ?paste, ?replace, ?undo) aren't available here since they need the live text field the accessibility flow has access to.


๐ŸŽจ Custom Commands

Create, edit, and manage your own commands in the Commands tab.

Two Types of Custom Commands

Type How It Works Needs API Key? Latency
AI Sends text to your AI provider with your custom prompt Yes ~1โ€“3 seconds
Text Replacer Replaces the trigger with a fixed string, entirely offline No Instant

Example AI Command Ideas

Trigger Prompt Use Case
?eli5 Explain this like I'm five years old. Simplify complex topics
?bullet Convert this text into bullet points. Quick formatting
?headline Rewrite this as a catchy headline. Social media posts
?code Convert this description into pseudocode. Developer shorthand
?tldr Summarize this text in one sentence. Quick summaries

Tip

Just describe the transformation you want โ€” SwiftSlate's system instruction automatically ensures the AI returns only the transformed text without extra commentary.


๐Ÿ”‘ API Key Management

SwiftSlate supports multiple API keys with intelligent rotation:

Feature Details
Round-Robin Rotation Keys are used in turn to spread usage evenly across all configured keys
Rate-Limit Handling If a key gets rate-limited (HTTP 429), SwiftSlate tracks the cooldown and skips it automatically
Invalid Key Detection Keys returning 401/403 errors are marked invalid and excluded from rotation
Encrypted Storage All keys encrypted with AES-256-GCM via Android Keystore before being saved locally
Live Validation Keys are validated against the provider's API before being saved

Tip

Adding 2โ€“3 API keys from different accounts helps avoid rate limits during heavy use. On the free tier, all keys under the same account share a single quota โ€” so rotation only helps with keys from separate accounts.


๐Ÿ’พ Backup & Restore

Export and import your custom commands as JSON files โ€” useful for migrating to a new device or sharing command sets.

  • Export โ€” Saves all custom commands to a .json file via Android's file picker
  • Import โ€” Loads commands from a .json file (validates format, trigger prefix, and size limits before importing)

Find both options in the Settings tab under Backup & Restore.

Note

Imported commands must use the same trigger prefix currently configured in the app. API keys are not included in backups for security.


๐Ÿ–ฅ๏ธ App Screens

SwiftSlate has four screens accessible via the bottom navigation bar:

๐Ÿ“Š Dashboard

  • Service status indicator (green/red)
  • Enable/disable toggle
  • API key count
  • Quick-start guide
  • Version info & update check

๐Ÿ”‘ Keys

  • Add new keys (validated live)
  • Delete existing keys
  • AES-256-GCM encryption
  • Multi-key management
  • Direct link to get API keys

๐Ÿ“ Commands

  • 5 built-in commands (read-only)
  • 9 AI commands, editable like your own
  • Add custom commands (AI or Text Replacer)
  • Edit existing custom commands
  • Delete custom commands

โš™๏ธ Settings

  • Provider selection (Gemini, Groq, Custom)
  • Model picker per provider
  • Custom endpoint URL & model
  • Trigger prefix customization
  • Backup & restore commands

๐Ÿ“ธ Screenshots

Dark Mode

Dashboard โ€” Dark API Keys โ€” Dark
Commands โ€” Dark Settings โ€” Dark

Light Mode

Dashboard โ€” Light API Keys โ€” Light
Commands โ€” Light Settings โ€” Light

๐ŸŒ Localization

SwiftSlate's UI is available in 40 languages:

๐Ÿ‡บ๐Ÿ‡ธ English en ๐Ÿ‡ธ๐Ÿ‡ฆ Arabic ar ๐Ÿ‡ง๐Ÿ‡ฌ Bulgarian bg ๐Ÿ‡ช๐Ÿ‡ธ Catalan ca
๐Ÿ‡จ๐Ÿ‡ฟ Czech cs ๐Ÿ‡ฉ๐Ÿ‡ฐ Danish da ๐Ÿ‡ฉ๐Ÿ‡ช German de ๐Ÿ‡ฌ๐Ÿ‡ท Greek el
๐Ÿ‡ช๐Ÿ‡ธ Spanish es ๐Ÿ‡ช๐Ÿ‡ช Estonian et ๐Ÿ‡ฎ๐Ÿ‡ท Persian fa ๐Ÿ‡ซ๐Ÿ‡ฎ Finnish fi
๐Ÿ‡ซ๐Ÿ‡ท French fr ๐Ÿ‡ฎ๐Ÿ‡ณ Hindi hi ๐Ÿ‡ญ๐Ÿ‡ท Croatian hr ๐Ÿ‡ญ๐Ÿ‡บ Hungarian hu
๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesian in ๐Ÿ‡ฎ๐Ÿ‡น Italian it ๐Ÿ‡ฎ๐Ÿ‡ฑ Hebrew iw ๐Ÿ‡ฏ๐Ÿ‡ต Japanese ja
๐Ÿ‡ฐ๐Ÿ‡ท Korean ko ๐Ÿ‡ฑ๐Ÿ‡น Lithuanian lt ๐Ÿ‡ฑ๐Ÿ‡ป Latvian lv ๐Ÿ‡ฒ๐Ÿ‡พ Malay ms
๐Ÿ‡ณ๐Ÿ‡ด Norwegian nb ๐Ÿ‡ณ๐Ÿ‡ฑ Dutch nl ๐Ÿ‡ต๐Ÿ‡ฑ Polish pl ๐Ÿ‡ต๐Ÿ‡น Portuguese pt
๐Ÿ‡ง๐Ÿ‡ท Portuguese (BR) pt-rBR ๐Ÿ‡ท๐Ÿ‡ด Romanian ro ๐Ÿ‡ท๐Ÿ‡บ Russian ru ๐Ÿ‡ธ๐Ÿ‡ฐ Slovak sk
๐Ÿ‡ธ๐Ÿ‡ฎ Slovenian sl ๐Ÿ‡ท๐Ÿ‡ธ Serbian sr ๐Ÿ‡น๐Ÿ‡ญ Thai th ๐Ÿ‡น๐Ÿ‡ท Turkish tr
๐Ÿ‡บ๐Ÿ‡ฆ Ukrainian uk ๐Ÿ‡ป๐Ÿ‡ณ Vietnamese vi ๐Ÿ‡จ๐Ÿ‡ณ Chinese zh ๐Ÿ‡จ๐Ÿ‡ณ Chinese (Simplified) zh-rCN

The app automatically uses your device's language, and falls back to English otherwise.

Adding a translation is a single directory: drop values-<locale>/strings.xml into app/src/main/res/ and it ships automatically โ€” the build derives the shipped locale list from that folder, so nothing else needs editing. Contributions welcome.


๐Ÿ”’ Privacy & Security

Note

SwiftSlate is built with privacy as a core architectural principle, not an afterthought.

Concern How SwiftSlate Handles It
๐Ÿ‘๏ธ Text Monitoring Only processes text when a trigger command is detected at the end. All other typing is completely ignored. Password fields are always skipped.
๐Ÿ“ก Data Transmission Text is sent only to the configured AI provider (Google Gemini, Groq, or your custom endpoint). No other servers are ever contacted. Text replacer commands never leave your device.
๐Ÿ” Key Storage API keys are encrypted with AES-256-GCM using the Android Keystore system. Encryption failures throw rather than falling back to plaintext.
๐Ÿ“Š Analytics None. Zero telemetry, zero tracking, zero crash reporting.
๐Ÿ“– Open Source The entire codebase is open for inspection under the MIT License.
๐Ÿ”‘ Permissions Requires Accessibility Service and notification permissions only.
๐Ÿ’พ Backups API keys and settings are excluded from Android cloud backups and device transfers.

๐Ÿ—๏ธ Tech Stack

LanguageKotlin 2.4
UIJetpack Compose ยท Material 3
AsyncKotlin Coroutines
HTTPHttpURLConnection (zero external dependencies)
JSONorg.json (Android built-in)
StorageSharedPreferences (encrypted via Android Keystore)
Background WorkWorkManager (daily update checks)
Core ServiceAndroid Accessibility Service
Build SystemGradle with Kotlin DSL
Java TargetJDK 17
Min SDKAPI 23 (Android 6.0)
Target SDKAPI 36

Zero third-party dependencies for networking or JSON parsing โ€” SwiftSlate uses only Android's built-in APIs.


๐Ÿ›๏ธ Architecture

com.musheer360.swiftslate/
โ”œโ”€โ”€ service/
โ”‚   โ”œโ”€โ”€ AssistantService.kt      # Core accessibility service โ€” event listening, trigger
โ”‚   โ”‚                            # detection, text replacement, undo, inline spinner
โ”‚   โ”œโ”€โ”€ CommandRunner.kt         # Shared request policy (key rotation, rate-limit backoff,
โ”‚   โ”‚                            # error mapping) used by both the accessibility service and
โ”‚   โ”‚                            # the text-selection popup
โ”‚   โ”œโ”€โ”€ ErrorMessages.kt         # Maps raw provider/network errors to localized strings
โ”‚   โ””โ”€โ”€ OverlayToast.kt          # TYPE_ACCESSIBILITY_OVERLAY toast with enter/exit animation
โ”œโ”€โ”€ api/
โ”‚   โ”œโ”€โ”€ GeminiClient.kt          # Google Gemini API client
โ”‚   โ”œโ”€โ”€ OpenAICompatibleClient.kt # Unified client for Groq + any OpenAI-compatible endpoint
โ”‚   โ””โ”€โ”€ ApiClientUtils.kt        # Shared utilities โ€” response parsing, error classification,
โ”‚                                # refusal detection, secret redaction, system prompt
โ”œโ”€โ”€ manager/
โ”‚   โ”œโ”€โ”€ KeyManager.kt            # Key storage, round-robin rotation, rate-limit tracking,
โ”‚   โ”‚                            # invalid-key benching with expiry
โ”‚   โ”œโ”€โ”€ KeyCipher.kt             # AES-256-GCM via AndroidKeyStore, behind an interface so
โ”‚   โ”‚                            # KeyManager is testable without the keystore
โ”‚   โ”œโ”€โ”€ CommandManager.kt        # Command CRUD, trigger matching (longest-match),
โ”‚   โ”‚                            # prefix migration, import/export
โ”‚   โ””โ”€โ”€ StatsManager.kt          # Usage counters โ€” monthly total, per-command, last 7 days
โ”œโ”€โ”€ provider/
โ”‚   โ””โ”€โ”€ ProviderConfig.kt        # Per-provider config (transport, endpoint, model key,
โ”‚                                # reasoning/thinking params) + registry
โ”œโ”€โ”€ model/
โ”‚   โ”œโ”€โ”€ Command.kt               # Command data class (AI or Text Replacer)
โ”‚   โ”œโ”€โ”€ GeminiModels.kt          # Gemini model catalog + per-model thinking level
โ”‚   โ”œโ”€โ”€ GroqModels.kt            # Groq model catalog + per-model reasoning params
โ”‚   โ”œโ”€โ”€ PrefKeys.kt              # SharedPreferences key constants
โ”‚   โ””โ”€โ”€ ProviderType.kt          # Provider constants (gemini, groq, custom)
โ”œโ”€โ”€ ui/
โ”‚   โ”œโ”€โ”€ DashboardScreen.kt       # Service status, key count, usage stats, 7-day chart
โ”‚   โ”œโ”€โ”€ KeysScreen.kt            # API key management with live validation
โ”‚   โ”œโ”€โ”€ CommandsScreen.kt        # Command list, add/edit/delete with collapsible form
โ”‚   โ”œโ”€โ”€ SettingsScreen.kt        # Provider, model, temperature, prefix, backup/restore
โ”‚   โ”œโ”€โ”€ processtext/             # ACTION_PROCESS_TEXT entry point (the text-selection menu)
โ”‚   โ”‚   โ”œโ”€โ”€ ProcessTextActivity.kt      # One-shot dialog activity, owns the bottom sheet
โ”‚   โ”‚   โ”œโ”€โ”€ ProcessTextViewModel.kt     # Picker -> loading -> result state machine
โ”‚   โ”‚   โ”œโ”€โ”€ ProcessTextInput.kt         # Parses/validates the system-provided selection
โ”‚   โ”‚   โ””โ”€โ”€ ProcessTextReplacement.kt   # Correlates a finished popup result with the next
โ”‚   โ”‚                                    # accessibility event to auto-replace in-place
โ”‚   โ”œโ”€โ”€ components/              # Reusable UI components (cards, text fields, dividers,
โ”‚   โ”‚                            # the app's own bottom sheet and toast)
โ”‚   โ””โ”€โ”€ theme/Theme.kt           # AMOLED dark + light Material 3 color schemes
โ”œโ”€โ”€ MainActivity.kt              # AnimatedContent tab navigation (4 tabs)
โ”œโ”€โ”€ SwiftSlateViewModel.kt       # Shared ViewModel exposing managers + prefs
โ”œโ”€โ”€ SwiftSlateApp.kt             # Application class โ€” SharedPreferences pre-warming,
โ”‚                                # WorkManager update check scheduling
โ””โ”€โ”€ worker/
    โ””โ”€โ”€ UpdateCheckWorker.kt     # Daily background check for new GitHub releases

๐Ÿ”จ Building from Source

Prerequisites

  • Android Studio (latest stable)
  • JDK 17+
  • Android SDK with API level 36

Build

# Clone the repository
git clone https://github.com/Musheer360/SwiftSlate.git
cd SwiftSlate

# Build debug APK
./gradlew assembleDebug

# Output: app/build/outputs/apk/debug/app-debug.apk

Install on device

adb install app/build/outputs/apk/debug/app-debug.apk
๐Ÿ“ฆ Signed release build
export KEYSTORE_FILE=/path/to/your/keystore.jks
export KEYSTORE_PASSWORD=your_keystore_password
export KEY_ALIAS=your_key_alias
export KEY_PASSWORD=your_key_password

./gradlew assembleRelease

๐Ÿงช Trying a Pull Request Without Touching Your Install

Every pull request builds a preview APK you can install side by side with a stable release.

It ships as a separate app โ€” applicationId com.musheer360.swiftslate.preview, shown on your launcher as SwiftSlate Preview โ€” so installing it never replaces your stable build and never touches its API keys, commands, stats or accessibility setting. Both appear as separate entries under Settings โ†’ Accessibility, and you can enable whichever you want to test.

  1. Open the pull request's Checks tab and pick the latest Build & Release run
  2. Download the SwiftSlate-preview-prNNN artifact from the Artifacts section
  3. Unzip and install the APK, then enable SwiftSlate Preview in accessibility settings
  4. Uninstall it when you're done โ€” your stable install is untouched throughout

Preview builds are shrunk and non-debuggable like release builds, but signed with a debug key, so they'll never silently update your stable app. To build one locally:

./gradlew assemblePreview
# app/build/outputs/apk/preview/app-preview.apk

โš ๏ธ Known Limitations

  • Some apps use custom input fields that don't support Android's standard text replacement APIs. SwiftSlate includes a clipboard-based fallback, but apps like WeChat and Chrome's address bar may still not work. Most standard text fields (messaging apps, email composers, notes, etc.) work fine.
  • Some OEMs restrict accessibility services. Certain manufacturers (e.g., OnePlus, Xiaomi) may hide or block third-party accessibility services in their settings UI. If SwiftSlate doesn't appear in your accessibility settings, check for a "Downloaded apps" or "Installed services" section, or try searching for it.
  • Aggressive battery optimization can silently disable the service. Some OEM skins (Xiaomi/MIUI, OnePlus/OxygenOS, Infinix/XOS, and others) kill background accessibility services after a period of inactivity to save battery, and Android itself does not let an accessibility service run as a foreground/persistent service to defend against this. If SwiftSlate stops responding and shows as disabled on the Dashboard after running for a while, this is almost always the cause โ€” re-enable it in Accessibility Settings, and look for a battery/OEM-specific "no restrictions" or "allow background activity" setting for SwiftSlate to prevent it recurring.
  • Some banking apps refuse to open while any accessibility service is enabled, including SwiftSlate. This is a security measure the bank's app controls entirely โ€” it checks the OS's list of enabled accessibility services and blocks itself if that list isn't empty, regardless of which app is on it or what that app actually does. There's no manifest flag or API that lets a legitimate accessibility tool opt out of another app's own check, so this can't be fixed on SwiftSlate's end. Disable SwiftSlate's accessibility permission before opening the affected banking app, then re-enable it afterward. The text-selection menu still works with accessibility disabled, since it doesn't use the service at all.

๐Ÿค Contributing

Contributions are welcome! Here's how to get involved:

# 1. Fork the repository, then:
git clone https://github.com/YOUR_USERNAME/SwiftSlate.git
cd SwiftSlate

# 2. Create a feature branch
git checkout -b feature/amazing-feature

# 3. Make your changes and commit
git commit -m "Add amazing feature"

# 4. Push and open a Pull Request
git push origin feature/amazing-feature

Ideas for Contributions

  • ๐Ÿงฉ New built-in commands
  • ๐Ÿค– Additional AI provider integrations
  • ๐ŸŽจ UI improvements and new themes
  • ๐ŸŒ Translations for more languages
  • ๐Ÿ“– Documentation improvements

๐Ÿ’œ Sponsors

SwiftSlate is made possible by the generous support of its sponsors. Thank you!

lifearien
@lifearien

Want to see your name here? Become a sponsor โ†’


โค๏ธ Support the Project

SwiftSlate is free, open source, and built in my spare time. If it's useful to you, consider supporting its development:

  • โญ Star this repo โ€” it helps others discover SwiftSlate
  • ๐Ÿ’– Sponsor on GitHub โ€” even a small contribution keeps the project going

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.


๐Ÿ“ˆ Star History




Made with โค๏ธ by Musheer Alam

If SwiftSlate makes your typing life easier, consider giving it a โญ


About

Android accessibility service for AI-powered text transformation

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

529 stars

Watchers

5 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages