Accio Notas
Handwritten notes with a stylus, at paper latency.
An Android app for handwriting with an S Pen or any standard stylus, without Samsung's SDK. The focus is on strokes that feel instant and on erase and undo that never fail.
The problem
Handwriting on Android often feels laggy: the stroke trails behind the pen. Many apps fix this with a vendor SDK and leave every other stylus out.
Key decisions
- Front-buffered live strokes. With
androidx.ink,InProgressStrokesViewdraws the stroke you are writing straight to the front buffer, andaddToStrokealso consumes eachMotionEvent’s historical samples, so no point is lost between frames. - A custom pressure brush. It maps pressure from 0.05–0.7 to a 0.3×–1.8× size multiplier over a 3 dp base, with 15 ms smoothing so the line weight doesn’t jitter.
- An explicit input filter. Only the stylus draws. The eraser tip and side button erase. Fingers and mice do nothing, and palm rejection discards the live stroke and restores anything erased in that gesture.
- Precise stroke eraser. A bounding-box prefilter, then geometric intersection against a parallelogram per path segment.
- Exact undo. A 200-step stack where erasing stores each stroke’s original index, so undo puts it back on its exact layer.
What I learned
The “paper” feel doesn’t come from visual design. It comes from never dropping samples, from palms that don’t smudge, and from perfect undo. A debug overlay showing pressure, tilt, sample rate and latency was the most useful tool in the project.
Next case
Clara