Android tablet port of MaximeRivest/riddle: write on the page with a pressure-sensitive stylus, wait for the diary to drink the ink, and watch an AI answer write itself back.
This is a native Android implementation rather than a wrapper around the original Rust executable. The reMarkable-only hardware layer has been replaced while the diary interaction, oracle protocol, and local memory model have been retained.
| Original riddle | Android implementation |
|---|---|
Raw Linux evdev pen samples |
Android MotionEvent, stylus pressure, batched samples, TOOL_TYPE_ERASER, and optional one-finger writing |
| RGB565/quill framebuffers | Hardware-accelerated Android View, Canvas, and an off-screen page bitmap |
| 2.8-second idle commit | Configurable 0.8–10 second stylus-rest timer; default 2.8 seconds |
| Cropped grayscale page PNG | Cropped/downscaled PNG generated in memory; no temporary page file |
| OpenAI-compatible SSE oracle | Native HttpURLConnection client for /chat/completions, inline vision image, streaming sentence parser, and token-field retry |
oracle.env |
On-tablet settings screen; API key encrypted with Android Keystore |
| Dancing Script stroke replay | Bundled Dancing Script face with progressive handwritten reply animation |
index.tsv plus stroke files |
App-private JSON index and per-page stroke files, capped at 400 memories |
⟦show:N⟧ / ⁂ protocol |
Same memory-conjuring and transcription protocol |
Large ? guide |
Same pen-only guide gesture, adapted to tablet dimensions |
| Five-finger/root takeover | Android immersive full-screen mode; normal system navigation remains available |
The Android version deliberately does not attempt direct e-ink waveform control. Refresh behavior is owned by the tablet firmware, so it works on conventional LCD/OLED Android tablets and Android-based e-ink tablets without root access.
- Android 8.0 or newer (API 26+)
- Portrait tablet layout
- An Android-compatible pressure-sensitive stylus, or the optional one-finger writing mode
- Internet access
- An API key for an OpenAI-compatible, vision-capable
/chat/completionsendpoint
- Install the APK produced by GitHub Actions.
- Enter the API key, base URL, and a vision-capable model in the settings screen.
For Alibaba Cloud Model Studio,
qwen3.6-flashis supported. Use the endpoint from the same region as the API key; a workspace-specific endpoint is recommended. The settings screen can run an image-capable connection test and displays the HTTP status, elapsed time, request ID, and raw response without exposing the API key. - Write with the stylus and lift it. On phones without a stylus, enable Allow writing with one finger in settings. After the configured pause, the page is committed.
- Tap the faint three-dot mark in the top-right corner with a finger to reopen settings.
- Draw a large
?with the stylus to show the in-app guide.
The API key is encrypted with an AES-GCM key held by Android Keystore. Completed page memories are stored in the app's private internal storage. Each committed handwriting crop and the configured recent-memory context are sent only to the configured oracle endpoint. There is no telemetry.
One-finger writing is disabled by default so stylus users retain palm rejection. When enabled, finger strokes use a fixed width and any multi-touch gesture cancels the current finger stroke.
The canonical build runs entirely on GitHub Actions. No local build is required.
- Push to
main, open a pull request, or run Android build manually from the Actions tab. - The workflow validates the Gradle wrapper, runs JVM unit tests and Android lint, and creates an installable debug APK.
- Download
riddle-android-debug-<run number>from the workflow run's Artifacts section.
Build stack:
- Android Gradle Plugin 9.3.0
- Gradle 9.5.0, with the official distribution SHA-256 pinned
- Temurin JDK 17
- compile/target SDK 36
The workflow installs Android Platform 36 and Build Tools 36.0.0 explicitly on the GitHub runner before invoking Gradle.
No API key or other secret is required by the build. The key is entered only on the tablet.
app/src/main/java/.../ui/DiaryView.java— stylus handling and diary state machineapp/src/main/java/.../ai/OracleClient.java— OpenAI-compatible SSE clientapp/src/main/java/.../ai/StreamParser.java— sentence, memory directive, and transcript parserapp/src/main/java/.../data/MemoryStore.java— private on-device page memoryapp/src/main/java/.../data/SettingsStore.java— settings and Keystore-backed API-key encryption.github/workflows/android.yml— the complete CI builddocs/MIGRATION.md— source-by-source migration decisions and intentional differences
MIT, matching the upstream project. Dancing Script is distributed under the SIL Open Font License; see third_party/dancing-script/OFL.txt.