How abhi245y/ola-dash-sdk works
Ola Dash SDK is an Android scooter dashboard with runtime-loadable Slint themes and owner-enabled, display-only plugins. The primary workflow receives vehicle-parser callbacks through the Java bridge, transfers values to the Rust host, and renders the theme with host-owned safety UI; a theme’s trunk request is routed back through a safety gate. The README also documents plugin data, optional stock-media and passcode-unlock capabilities, session/CAN logging, and desktop theme preview. Some subsystems are documented but not fully represented in the supplied source excerpts, so those links are marked unverified.
Main entry points: lib.rs Rust Slint Host · VehicleBridge.java Vehicle Bridge · MainActivity.java Android Activity · PluginHost.java Plugin Host
Components 21
Vehicle Interface
- Vehicle Callback SDK
sdk/vehicle-interface/java/com/olaelectric/vehicleinterface - Vehicle Bridge
host/java/dev/olatool/dash/VehicleBridge.java
Host Runtime
- Android Activity
host/java/dev/olatool/dash/MainActivity.java - Rust Slint Host
host/src/lib.rs - Safety Overlay
host/src/lib.rs - Trunk Request Gate
host/java/dev/olatool/dash/TrunkGate.java - Unlock Controller
host/java/dev/olatool/dash/UnlockController.java - Profile Service Client
host/java/dev/olatool/dash/ProfileService.java
Themes And Plugins
- Theme Loading
host/src/theme_root.rs - Theme Options
host/src/theme_options.rs - Theme Settings
host/src/settings.rs - Theme Switching
host/src/theme_switch.rs - Plugin Host
host/java/dev/olatool/dash/plugin/PluginHost.java - Built-in Media
host/java/dev/olatool/dash/plugin/StockMediaService.java - Example Plugin
plugins/example-sysinfo/src/dev/olatool/dash/plugin/sysinfo/SysinfoService.java - Runtime Theme
Preview And Support
- Session And CAN Logs
host/java/dev/olatool/dash/Trace.java - Desktop Theme Preview
sim/src/main.rs
Other components
- Scooter Rider
- Vehicle Parser
- Plugin APKs
Connections 23
- Vehicle Parser → Vehicle Bridge: sends callbacks
- Vehicle Bridge → Vehicle Callback SDK: implements callbacks
host/java/dev/olatool/dash/VehicleBridge.java - Vehicle Bridge → Rust Slint Host: passes JNI values
- Vehicle Bridge → Session And CAN Logs: logs callbacks
host/java/dev/olatool/dash/VehicleBridge.java - Scooter Rider → Android Activity: uses dashboard
- Android Activity → Vehicle Bridge: starts bridge
host/java/dev/olatool/dash/MainActivity.java - Rust Slint Host → Theme Loading: loads theme
host/src/lib.rs - Rust Slint Host → Safety Overlay: draws above theme
host/src/lib.rs - Theme Loading → Runtime Theme: interprets at runtime
- Theme Options → Theme Settings: uses shared settings
host/src/theme_options.rs - Rust Slint Host → Theme Options: configures options
host/src/lib.rs - Rust Slint Host → Theme Switching: switches themes
host/src/lib.rs - Runtime Theme → Rust Slint Host: requests trunk
- Rust Slint Host → Android Activity: dispatches actions
host/java/dev/olatool/dash/MainActivity.java - Android Activity → Vehicle Bridge: forwards request
host/java/dev/olatool/dash/MainActivity.java - Vehicle Bridge → Trunk Request Gate: checks conditions
host/java/dev/olatool/dash/VehicleBridge.java - Plugin Host → Plugin APKs: binds enabled plugins
- Plugin APKs → Plugin Host: publishes data
- Android Activity → Plugin Host: starts host
host/java/dev/olatool/dash/MainActivity.java - Android Activity → Unlock Controller: routes keypad input
host/java/dev/olatool/dash/MainActivity.java - Unlock Controller → Profile Service Client: authenticates passcode
host/java/dev/olatool/dash/UnlockController.java - Plugin Host → Built-in Media: coordinates media
host/java/dev/olatool/dash/plugin/PluginHost.java - Desktop Theme Preview → Runtime Theme: previews with mock data