Skip to content

Repository files navigation

🌸 Saku β€’ 咲く

Minimal Spaced Repetition Japanese Flashcard Widget for Android

Platform Latest Release APK Size Kotlin UI Anki Integration License: MIT

Passive Japanese immersion directly on your Home Screen, Lock Screen, and Always-On Display (AOD) β€” seamlessly synced with your AnkiDroid decks without losing your FSRS / SM-2 algorithm schedule.


β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   β”Œβ”€β”€β”€β”€β”   ひ  hi                                           β”‚
β”‚   β”‚ ζ—₯ β”‚   sun                                              β”‚
β”‚   β””β”€β”€β”€β”€β”˜   ζ—₯本  β€’  Japan                                   β”‚
β”‚                                                             β”‚
β”‚   [ Again ]    [ Hard ]    [ Good (4d) ]    [ Easy (7d) ]   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🌟 Highlights

  • πŸ”’ Zero Login / 100% On-Device & Private: No usernames, passwords, or cloud relay servers. Uses Android's native inter-process ContentProvider API (com.ichi2.anki.api) with a 1-tap permission prompt.
  • 🧠 Preserves Your Algorithm (FSRS & SM-2): Reviews made on the widget are submitted directly into AnkiDroid. Your intervals, stability, retention factors, and AnkiWeb cloud sync stay 100% accurate and intact.
  • πŸ“± Lock Screen & Always-On Display (AOD): Optimized for OxygenOS (OnePlus), Samsung OneUI, Google Pixel, and modern Android devices. Pinned high-contrast card right under the lock screen clock without needing to unlock your phone.
  • ⚑ Interactive Home Screen Widget: Built with Jetpack Glance (Compose for AppWidgets). Flip cards, advance cards, or submit ratings (Again, Hard, Good, Easy) directly from your home screen.
  • πŸ—£οΈ AI Japanese Speaking Partner: Interactive voice conversation screen powered by Gemini Flash and Fish Audio / Android TTS with real-time speech recognition and JLPT-level guidance.
  • πŸ“– AI Reading Generator (Gemini Flash): Generates customized Japanese graded reading passages tailored directly from your due or studied Anki vocabulary, with instant vocabulary tapping, furigana toggle, English translation, and reading history.
  • πŸŽ™οΈ Natural Japanese Voice Synthesis (Fish Audio & System TTS): High-fidelity neural voice playback for reading stories, conversations, and vocabulary words powered by Fish Audio, alongside reliable on-device Android Text-to-Speech fallback.
  • πŸ“š Offline Jisho Dictionary & Quick Translation: Tap-to-define lookup for Kanji and vocabulary, JLPT levels, definitions, readings, and a slide-up translation sheet with custom text selection toolbar.
  • ✨ Liquid Glass Aesthetic & Interactive Effects: Modern glassmorphic theme styling, custom wallpaper backgrounds, multi-theme support (Dark, Dim, Light, OLED), and ambient shooting stars effects.
  • πŸ”‹ Ultra Lightweight & Offline Capable:
    • APK size: ~20 MB (fully bundled with offline Jisho dictionary lookup & rich vector assets)
    • Memory: < 25 MB RAM (drops to 0 when idle)
    • Battery: < 0.1% / day (zero background polling loops)
    • 100% Offline Capable: Core flashcards, widget reviews, and dictionary lookups work anywhere with zero internet required.

✨ What's New in v3.0.0

  • 🎭 Pre-set AI Conversation Personas & Topics: Practice realistic Japanese conversations tailored by scenario (Coffee Shop, Traveling in Japan, Casual Chat, Job Interview, Anime Discussion) with customized tone and JLPT level guidelines.
  • ⚑ Real-Time Audio Spectrum Visualizer: Dynamic audio visualizer animations for Fish Audio voice playback and user microphone input.
  • πŸŽ™οΈ Fish Audio Neural Voice Selection & Custom Pitch/Speed: Fine-tune speaking and reading playback with custom pitch, rate, and voice presets.
  • πŸ“– Interactive Reading Experience: Enhanced story vocabulary analysis, improved quiz distraction options, and smooth sentence flow.

πŸ“₯ Download & Install

Option 1: Official Showcase Website & Direct APK

  • Visit the dedicated Saku Web Portal (or run npm run dev in website/) to preview features and download the APK directly.
  • Download Saku.apk (~20 MB) directly from the repository or from the GitHub Releases (v3.0.0) page.
  • Tap the downloaded file and select Install (if prompted by Google Play Protect, tap "More details" $\rightarrow$ "Install anyway").

Option 2: 5-Second First-Time Setup

  1. Open Saku on your phone.
  2. Tap "Connect to AnkiDroid (1-Tap)" $\rightarrow$ tap Allow.
  3. Pick your Japanese deck (e.g. Kaishi 1.5k, Core 2k/6k, Tango N5/N4, or Wanikani).
  4. Home Screen Widget: Long-press your home screen $\rightarrow$ tap Widgets $\rightarrow$ add Saku.
  5. Lock Screen / AOD: Toggle "Lock Screen & AOD Display" ON in the app $\rightarrow$ lock your phone to enjoy!

πŸ—οΈ Architecture & How It Works

graph TD
    subgraph UI_Surfaces["Android UI Surfaces"]
        HS["Home Screen Widget (Jetpack Glance)"]
        LS["Lock Screen & AOD Card (RemoteViews)"]
        App["Configuration & Study App (Jetpack Compose)"]
    end

    subgraph Saku_Core["Saku App Core"]
        Engine["Card Presenter & Preferences"]
        Parser["Japanese Field & Furigana Parser"]
        Reader["AI Graded Reader & History"]
        Jisho["Offline Jisho Dictionary & TTS Engine"]
    end

    subgraph Anki_Layer["Local Anki Layer (On-Device)"]
        AnkiClient["AnkiDroid ContentProvider Client"]
        AnkiDroid["AnkiDroid App (FSRS / SM-2 Scheduler)"]
    end

    HS <--> Engine
    LS <--> Engine
    App <--> Engine
    App <--> Reader
    App <--> Jisho
    Engine <--> Parser
    Engine <--> AnkiClient
    AnkiClient <==>|com.ichi2.anki.flashcards IPC| AnkiDroid
    AnkiDroid -.->|Standard Cloud Backup| AnkiWeb["AnkiWeb Cloud"]
Loading

1. Zero-Friction Inter-Process Communication (IPC)

Saku communicates with AnkiDroid through Android's secure ContentProvider:

// Queries due cards directly from AnkiDroid's local SQLite database
val cursor = context.contentResolver.query(
    AnkiDroidContract.Cards.CONTENT_URI,
    arrayOf("_id", "nid", "did", "ivl", "due"),
    "did = ?",
    arrayOf(deckId.toString()),
    "due ASC LIMIT 30"
)

2. Live Review Grading

When you press a rating button on the widget, Saku forwards the answer to AnkiDroid, which runs your active algorithm (FSRS weights or SM-2):

val answerUri = Uri.parse("content://com.ichi2.anki.flashcards/cards/$cardId/answer")
val values = ContentValues().apply { put("ease", ease) }
context.contentResolver.update(answerUri, values, null, null)

πŸ› οΈ Building from Source

Prerequisites

  • Android Studio (Koala / Ladybug / Meerkat or newer)
  • Android SDK (API 35, Min SDK 26)
  • JDK 17+

1. Clone the repository

git clone https://github.com/LiebeandSkye/saku.git
cd saku

2. Build via Command Line

# Windows
.\gradlew.bat assembleDebug

# macOS / Linux
chmod +x gradlew
./gradlew assembleDebug

The compiled APK will be generated at: app/build/outputs/apk/debug/app-debug.apk

3. Run Showcase Web Portal (Optional)

cd website
npm install
npm run dev

πŸ“– Supported Anki Decks & Note Formats

Saku includes a smart Japanese field and furigana parser (JapaneseFieldParser.kt) compatible with virtually all standard Japanese Anki formats:

  • Kaishi 1.5k / 2.3k
  • Core 2k / 6k / 10k
  • Tango N5 / N4 / N3 / N2 / N1
  • Wanikani Anki Decks
  • Remembering the Kanji (RTK)
  • Furigana bracket syntax: Automatically cleans and parses formats like ζ—₯本[にほん] $\rightarrow$ Headword: ζ—₯本, Reading: にほん, Romaji: nihon.
  • HTML Tags & Audio sound tags: Automatically strips <br>, <div>, and [sound:...] annotations for a clean minimal widget display.

πŸ” Permissions & Privacy

Saku is built with extreme privacy in mind. Your flashcard reviews remain completely on your local device:

  • android.permission.INTERNET: Used exclusively when optional online features are invoked (AI Reading Generator via Google Gemini Flash API, Fish Audio neural TTS, and quick translation). Flashcard reviews, widget updates, and Anki database operations remain 100% offline.
  • com.ichi2.anki.permission.READ_WRITE_DATABASE: Used solely to read due cards and record review answers with AnkiDroid locally on your phone.
  • android.permission.POST_NOTIFICATIONS: Required on Android 13+ to display the minimal card on your Lock Screen and Always-On Display.
  • android.permission.FOREGROUND_SERVICE: Keeps the Lock Screen card pinned cleanly without being killed by Android battery optimizations.

🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.

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

πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.


Made with ❀️ for Japanese learners.

Releases

Packages

Contributors

Languages