📱 Production Showcase: Speed Assistant App
The Flagship Consumer Telematics Reference Implementation Powered by Veg Sahayyak SDK.
🌟 Overview & Reference Role
The Speed Assistant App serves as the primary production reference implementation of the Veg Sahayyak SDK (com.vegsahayyak:speed-core and com.vegsahayyak:speed-ui).
Instead of maintaining a separate in-house telematics pipeline, the Speed Assistant consumer app delegates all GPS velocity calculation, signal noise filtering, threshold monitoring, and speedometer gauge rendering directly to the SDK.
⚡ Technical Benchmarks in Production
| Dimension | Engineering Guarantee | SDK Implementation |
|---|---|---|
| Memory Footprint | < 5 MB runtime heap | Headless core engine with zero memory leaks and minimal object allocations in the critical location loop. |
| UI Render Performance | Fluid 60 FPS | Hardware-accelerated Canvas rendering via @Composable SpeedGauge. |
| GPS Velocity Smoothing | Proprietary Native EMA | Eliminates raw sensor jitter without introducing perceptible lag. |
| Threshold Stability | Dual Schmitt Hysteresis | Proprietary upper/lower bounds eliminate alarm flutter. |
| Lifecycle Compliance | Android 10 to 15+ Safe | Native FOREGROUND_SERVICE_LOCATION handling with zero unneeded wake-locks when stationary. |
🛠️ How the Production App Implements the SDK
The reference application integrates the SDK using standard Kotlin Coroutines and Jetpack Compose state collection:
1. Initialization in Application / Activity
kotlin
// Initialize and configure headless telematics
val speedAssistant = SpeedAssistant.with(context, "YOUR_JWT_LICENSE")
.setWarningSpeedThreshold(80f) // Alert threshold in km/h
.setMinWarningSpeedThreshold(30f) // Minimum corridor threshold
.setColorScheme(
SpeedColorScheme(
safeColor = 0xFF00E676.toInt(),
overSpeedColor = 0xFFFF1744.toInt(),
underSpeedColor = 0xFF00E5FF.toInt()
)
)
// Start headless foreground service
speedAssistant.start()2. Rendering the HUD Gauge in Jetpack Compose
kotlin
@Composable
fun DriverDashboardScreen() {
val speedState by SpeedAssistant.observeFlow()
.collectAsState(initial = SpeedData.SpeedUnavailable)
val currentSpeedKmh = (speedState as? SpeedData.SpeedChanged)?.let {
it.speedMps * 3.6f
} ?: 0f
val isOverLimit = (speedState as? SpeedData.SpeedChanged)?.isOverLimit ?: false
Column(
modifier = Modifier
.fillMaxSize()
.background(Color.Black),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
SpeedGauge(
speed = currentSpeedKmh,
warningSpeed = 80f,
minSpeedLimit = 30f,
isTrackingActive = true,
isOverLimit = isOverLimit,
unitLabel = "km/h",
themeMode = ThemeMode.OLED_BLACK
)
}
}🔗 Live Application Links
To see the user interface, design, and feature set in action:
- 🌐 Official Web Landing Page: https://speed-assistant-a00f6.web.app/
- 💻 Open-Source Sample Projects: https://github.com/VegSahayyak/veg-sahayyak-samples
- 📦 SDK Integration Guide: Getting Started with Veg Sahayyak SDK
- 📐 Architecture Deep Dive: Signal Smoothing & Schmitt Trigger Architecture
