ink-app-builder
Installation
SKILL.md
The Android Ink API (androidx.ink) is a modular Jetpack library for building
high-performance, low-latency freehand drawing experiences on Android. It uses a
wet ink and dry ink two-phase model:
- Wet ink : Real-time, ultra-low-latency rendering while the user is drawing, handled by the
InProgressStrokescomposable. - Dry ink : Finalized, immutable
Strokeobjects rendered by the app usingCanvasStrokeRenderer.
Setup and dependencies
The Ink API requires minSdk = 26 , which corresponds to Android 8.0 (API
level 26) and higher. All androidx.ink modules MUST share an identical version
in gradle/libs.versions.toml. Ask user permission before modifying project
build files.
Version selection (1.0.0 stable versus 1.1.0-alpha03 and higher)
- Use
1.0.0(Stable) for production apps that rely onStockBrushesor pre-serialized.brushassets decoded withBrushFamily.decode. In1.0.0stable,BrushFamily.encode,BrushFamily.decode,AndroidBrushFamilySerialization, andBrushFamilyDecodeCallbackrequire@OptIn(ExperimentalInkCustomBrushApi::class). - Use
1.1.0-alpha03and higher when the app constructs programmatic custom brushes (BrushFamily,BrushCoat,BrushTip,BrushPaint,BrushBehavior) in Kotlin code. Starting in1.1.0-alpha02and higher,BrushFamilyserialization requires no@OptIn(and in1.1.0-alpha05and higher,ExperimentalInkCustomBrushApiis@RestrictTo(LIBRARY_GROUP), so NEVER annotate1.1.0-alpha03and higher code with it).