App Framework
App Model
Sticky device-side apps follow a unified app model:
App Lifecycle
Each app has a clear lifecycle:
- Load — Load app resources from storage
- Initialize — Initialize app state and data
- Run — App is in foreground, responding to user actions
- Background — App is switched to background, state preserved
- Destroy — App is uninstalled or resources reclaimed by system
App Interfaces
Each app must implement these standard interfaces:
onCreate()— Called when the app is createdonStart()— Called when the app startsonResume()— Called when the app returns to foregroundonPause()— Called when the app enters backgroundonDestroy()— Called when the app is destroyedonRender()— Called when the app needs to render
Page Rendering
Apps render content to the e-ink screen through the rendering engine:
- Supports full refresh and partial refresh modes
- Full refresh: Entire screen update, better display quality but slower
- Partial refresh: Only updates changed areas, faster but may show ghosting
Event System
Apps interact with the system and users through the event system:
- Touch events: Tap, swipe
- Button events: AI button, page buttons
- System events: Network change, battery change
- Timer events: Scheduled tasks
SenseCraft HMI
Sticky comes pre-installed with SenseCraft HMI, a native app that provides HMI interaction interface and content display capabilities.
Next Steps
- OTA Update Mechanism — Firmware update process