Skip to content

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 09 Nov 18:41
· 76 commits to main since this release
dcd97a8

AltShift v0.3.2 — the first public release of AltShift for Android 8.0+, packaging the complete feature set accumulated across v0.1–v0.3.1. It delivers signed release distribution, deterministic build artifacts, an allocation-free Russian ЙЦУКЕН transliteration pipeline, event-driven automatic IME switching, a fullscreen onboarding wizard, and Light/Dark/System themes in pure Java 21 with zero Kotlin, DI, or cloud telemetry.


⌨️ Russian Transliteration & Input Pipeline

  • Allocation-free TransliterationTable: Maps key codes to Cyrillic via primitive-indexed static arrays, resolving Shift and CapsLock at lookup time without iterators, string concatenation, or runtime allocations on the typing path.
  • Full Russian PC layout & CapsLock isolation: Emulates desktop ЙЦУКЕН punctuation and the physical number row (!, ", №, ;, %, :, ?, *, (, )). CapsLock inversion applies strictly to alphabetic keys while keeping digits and symbols unaffected.
  • Language toggle & app hotkeys: Alt + Shift toggles Russian mode by default (captured from the next physical combination in UI, matched in either modifier order, bypassing OS subtype switching). Application hotkeys match modifier masks + key codes on initial key-down (repeatCount == 0) via launcher intents before transliteration.
  • Pass-through & fail-safe service: Unmapped/out-of-range keys, Ctrl/Meta chords, and events when Russian mode is off pass through unchanged. External intents, InputConnection calls, and device lookups are guarded so IME exceptions cannot take down system input.

🔄 Automatic IME Switching

  • Physical keyboard detection & foreground monitor: KeyboardPresenceMonitor checks KEYBOARD_NOKEYS/hardKeyboardHidden and enumerates InputManager devices (excluding virtual and touchscreen-only devices; KEYBOARD_TYPE_ALPHABETIC on API 29+). KeyboardSwitchService runs as an event-driven specialUse foreground service listening to InputDeviceListener callbacks rather than polling.
  • Secure-settings switching & fallbacks: With WRITE_SECURE_SETTINGS, InputMethodSwitcher updates Settings.Secure.DEFAULT_INPUT_METHOD directly, remembers the previous soft keyboard, and restores it on detach. Without it, AltShift falls back to a one-tap reconnection notification or the system picker (previous/next guarded to API 28+).
  • Soft-keyboard suppression & reboot recovery: onShowInputRequested() returns false while a physical keyboard is attached; BootReceiver restarts KeyboardSwitchService after BOOT_COMPLETED when auto-switching is enabled and WRITE_SECURE_SETTINGS is granted.

🎨 Onboarding, UI & Architecture

  • Fullscreen onboarding & Material 3 dashboard: A three-step wizard verifies IME enablement, active selection, overlay access, and runtime POST_NOTIFICATIONS (Android 13+) with one-tap actions and hardened notification icons. Native XML views provide a toolbar status badge, language-shortcut card, auto-switch controls, hotkey list, key-capture dialog, and RecyclerView app picker, with persisted Light/Dark/System themes (root overdraw removed).
  • Pure Java 21 & zero-bloat storage: Uses AppCompat, Material 3, RecyclerView, SharedPreferences, and org.json only—no Kotlin, Compose, DI, or annotation processors. All settings and hotkeys stay strictly local per package, vanish on uninstall, and guard platform calls individually against OEM restrictions.

🧪 Build, CI/CD & Tests

  • Signed CI & deterministic artifacts: versionCode 5, versionName '0.3.2' (minSdk 26, targetSdk 34, Java 21, Groovy DSL, pinned Gradle wrapper). applicationVariants names outputs AltShift-v0.3.2.apk and AltShift-v0.3.2-debug.apk. GitHub Actions (actions/setup-java@v5, Temurin 21, Gradle cache) decodes KEYSTORE_BASE64 into app/release.jks (always removed in cleanup), builds both variants, uploads artifacts, and publishes tags via softprops/action-gh-release. Added git-ignored local wrapper template scripts/build-release.sh.example.
  • JVM test suite: Covers TransliterationTable (lower/upper letters, CapsLock inversion on letters vs isolation on digits/symbols, punctuation, Russian number row, null/out-of-range keys), hotkey matching (modifier masks, order equivalence, language shortcut, null package, unknown key codes, persistence round-trips), KeyLabelFormatter, and ThemeMode parsing/fallbacks.

📥 Installation

Asset Description
AltShift-v0.3.2.apk Signed release build — recommended.
AltShift-v0.3.2-debug.apk Debug build signed with the local debug key.
adb install -r AltShift-v0.3.2.apk
adb shell ime enable ru.b1sted.altshift/.service.HardwareInputService
adb shell ime set ru.b1sted.altshift/.service.HardwareInputService

Optional autonomous switching (also configurable via Settings → System → Languages & input → On-screen keyboard):

adb shell pm grant ru.b1sted.altshift android.permission.WRITE_SECURE_SETTINGS

Note: Distributed via GitHub Releases (not Google Play). Debug and release APKs use different signing keys—uninstall the debug build (adb uninstall ru.b1sted.altshift) before switching, which also clears local configuration.


🔨 Building from Source

Requires JDK 21, Android SDK Platform 34, and Build-Tools 34.0.0, with sdk.dir in local.properties:

./gradlew assembleDebug
# Or signed release (with KEYSTORE_FILE / KEYSTORE_PASSWORD / KEY_ALIAS / KEY_PASSWORD or scripts/build-release.sh):
./gradlew assembleRelease

⚠️ Notes & Limitations

  • No on-screen keyboard: AltShift does not draw a soft keyboard; use the system IME or automatic fallback when no physical keyboard is attached.
  • Permission-scoped switching: Without WRITE_SECURE_SETTINGS, automatic switching is limited to the reconnection notification prompt or the system keyboard picker.
  • App picker scope: Only components with a launcher activity appear in the application picker for hotkey binding.
  • Incompatible signing keys: Release builds cannot update a debug installation in place without uninstalling first.

🛡️ Security & Analysis (AltShift-v0.3.2.apk)


Full Changelog: v0.1...v0.3.2