AI-powered battery monitoring app built with React Native and Expo.
- Real-time Battery Stats - Level, health, temperature, voltage, current draw
- Native Android Integration - Uses BatteryManager API for accurate data
- 24h Trend Chart - Track battery usage over time
- AI Battery Advisor - Personalized tips using Groq AI
- Health Tips - Battery care recommendations
- Multi-Language Support - 6 languages (English, Spanish, French, German, Hindi, Chinese)
- Dark Theme UI - Modern gradient-based design
| Dashboard | Tips | AI Advisor |
|---|---|---|
| Battery gauge, stats cards, trend chart | Expandable health tips | AI-powered suggestions |
- React Native + Expo SDK 54
- TypeScript
- Native Android Module (Kotlin)
- Groq AI API
- AsyncStorage for persistence
- react-native-svg + react-native-chart-kit
- Node.js 20+
- Expo CLI
- Android device or emulator
# Clone the repo
git clone https://github.com/mithun50/BatteryPlus.git
cd BatteryPlus
# Install dependencies
npm install
# Start development server
npm startExpo Go (Basic Mode):
npm start
# Scan QR code with Expo Go appNative Build (Full Features):
# Generate native project
npx expo prebuild
# Build and run
npx expo run:androidThe app includes a custom native module (modules/battery-native) that provides:
| Function | Description |
|---|---|
getCurrentNow() |
Real-time current draw (μA) |
getTemperature() |
Battery temperature (°C) |
getVoltage() |
Battery voltage (mV) |
getHealthStatus() |
GOOD, OVERHEAT, COLD, etc. |
getCycleCount() |
Charge cycles (if available) |
getChargeCounter() |
Remaining charge (μAh) |
getDesignCapacity() |
Battery capacity (mAh) |
Note: Native features require building the app (
expo prebuild). Expo Go shows basic data only.
- Get API key from Groq Console
- Open app → AI Advisor tab → Enter API key
- Get personalized battery care suggestions
# Preview APK
eas build --platform android --profile preview --local
# Production AAB
eas build --platform android --profile production --localPush to main branch triggers automatic build. Add these secrets:
| Secret | Description |
|---|---|
EXPO_TOKEN |
Expo access token |
ANDROID_KEYSTORE_BASE64 |
Base64 encoded keystore |
ANDROID_KEYSTORE_PASSWORD |
Keystore password |
ANDROID_KEY_ALIAS |
Key alias |
ANDROID_KEY_PASSWORD |
Key password |
BatteryPlus/
├── App.tsx # Main app component
├── src/
│ ├── components/ # UI components
│ ├── hooks/ # useBattery hook
│ ├── services/ # API & storage services
│ ├── types/ # TypeScript types
│ └── utils/ # Constants & helpers
├── modules/
│ └── battery-native/ # Native Android module
└── .github/workflows/ # CI/CD
MIT