
Reactive battery intelligence library delivering a unified API for devices, exposing deep diagnostics (cycle count, current, voltage, temperature), smart status detection, and a UI-friendly reactive hook.
Volta is a powerful, reactive battery intelligence library for Kotlin Multiplatform (KMP) and Compose Multiplatform.
Monitor battery health, charging status, and advanced diagnostics across Android, iOS, and Desktop (Windows, macOS, Linux) with a single, unified API. Stop writing platform-specific code for battery monitoring and start using Volta.
StateFlow for seamless integration with modern UI architectures.rememberBatteryState() hook for instant UI updates.Add Volta to your commonMain dependencies in your build.gradle.kts file:
commonMain.dependencies {
implementation("io.github.techie-labs:volta:1.0.0-beta02")
}Get reactive battery updates in your UI with just one line of code:
import androidx.compose.runtime.getValue
import io.techie.volta.rememberBatteryState
@Composable
fun BatteryDashboard() {
val battery by rememberBatteryState()
Column {
Text("Battery Level: ${battery.level}%")
Text("Charging Status: ${battery.chargingStatus}")
if (battery.isPowerSavingMode) {
Text("⚠️ Low Power Mode is ON")
}
}
}Observe battery changes in your business logic:
class BatteryViewModel(private val batteryProvider: BatteryStateProvider) {
init {
batteryProvider.observe()
viewModelScope.launch {
batteryProvider.battery.collect { state ->
println("Current Level: ${state.level}%")
}
}
}
}<uses-permission android:name="android.permission.BATTERY_STATS" /> for full diagnostics.wmic and powercfg.pmset and system_profiler./sys/class/power_supply/.| Feature | Android 🤖 | iOS 🍎 | Windows 🪟 | macOS 🍏 |
|---|---|---|---|---|
| Level & Status | ✅ | ✅ | ✅ | ✅ |
| Power Saving | ✅ | ✅ | ❌ | ❌ |
| Voltage | ✅ | ❌ | ❌ | ✅ |
| Temperature | ✅ | ❌ | ❌ | ✅ |
| Technology | ✅ | ❌ | ❌ | ✅ |
| Cycles | ✅ (14+) | ❌ | ✅ | ✅ |
| Current (Now) | ✅ | ❌ | ❌ | ✅ |
| Safe Mode | ✅ | ❌ | ❌ | ❌ |
| Time Remaining | ❌ | ❌ | ❌ | ❌ |
| Capacity | ✅ | ❌ | ❌ | ✅ |
Volta includes comprehensive unit tests for its core logic. The CI pipeline runs these tests on every push to ensure stability.
./gradlew allTestsContributions are welcome! Please read our CONTRIBUTING.md to get started.
Volta is open-source software licensed under the Apache 2.0 License.
Built with ⚡ by Techie Labs
Volta is a powerful, reactive battery intelligence library for Kotlin Multiplatform (KMP) and Compose Multiplatform.
Monitor battery health, charging status, and advanced diagnostics across Android, iOS, and Desktop (Windows, macOS, Linux) with a single, unified API. Stop writing platform-specific code for battery monitoring and start using Volta.
StateFlow for seamless integration with modern UI architectures.rememberBatteryState() hook for instant UI updates.Add Volta to your commonMain dependencies in your build.gradle.kts file:
commonMain.dependencies {
implementation("io.github.techie-labs:volta:1.0.0-beta02")
}Get reactive battery updates in your UI with just one line of code:
import androidx.compose.runtime.getValue
import io.techie.volta.rememberBatteryState
@Composable
fun BatteryDashboard() {
val battery by rememberBatteryState()
Column {
Text("Battery Level: ${battery.level}%")
Text("Charging Status: ${battery.chargingStatus}")
if (battery.isPowerSavingMode) {
Text("⚠️ Low Power Mode is ON")
}
}
}Observe battery changes in your business logic:
class BatteryViewModel(private val batteryProvider: BatteryStateProvider) {
init {
batteryProvider.observe()
viewModelScope.launch {
batteryProvider.battery.collect { state ->
println("Current Level: ${state.level}%")
}
}
}
}<uses-permission android:name="android.permission.BATTERY_STATS" /> for full diagnostics.wmic and powercfg.pmset and system_profiler./sys/class/power_supply/.| Feature | Android 🤖 | iOS 🍎 | Windows 🪟 | macOS 🍏 |
|---|---|---|---|---|
| Level & Status | ✅ | ✅ | ✅ | ✅ |
| Power Saving | ✅ | ✅ | ❌ | ❌ |
| Voltage | ✅ | ❌ | ❌ | ✅ |
| Temperature | ✅ | ❌ | ❌ | ✅ |
| Technology | ✅ | ❌ | ❌ | ✅ |
| Cycles | ✅ (14+) | ❌ | ✅ | ✅ |
| Current (Now) | ✅ | ❌ | ❌ | ✅ |
| Safe Mode | ✅ | ❌ | ❌ | ❌ |
| Time Remaining | ❌ | ❌ | ❌ | ❌ |
| Capacity | ✅ | ❌ | ❌ | ✅ |
Volta includes comprehensive unit tests for its core logic. The CI pipeline runs these tests on every push to ensure stability.
./gradlew allTestsContributions are welcome! Please read our CONTRIBUTING.md to get started.
Volta is open-source software licensed under the Apache 2.0 License.
Built with ⚡ by Techie Labs