Battery Alarm Guard is an elegant Android application designed to protect your device's battery health. It alerts you when your battery reaches a certain high level (to prevent overcharging) or a low level (to ensure you're never out of power), helping you extend the overall lifespan of your battery.
This entire project was coded completely using Gemini Pro and GPT Go. It stands as a testament to how AI can empower developers to build functional, beautiful, and user-centric tools from scratch.
- 🚀 Real-Time Monitoring: Keep track of your battery percentage, temperature, health status, and cycle counts in real-time.
- 🔔 High Battery Alert: Set a custom threshold (e.g., 80% or 95%) to get notified when your phone is sufficiently charged.
- 🪫 Low Battery Alert: Set a minimum limit to receive an alarm before your phone dies.
- 🎶 Custom Alarm Sounds: Choose your favorite ringtone or alarm sound for the notifications.
- 🌓 Dynamic Theme Toggle:
- Smooth switching between Dark and Light modes.
- Unique UI: In Dark mode, see a Sun icon (Light) on a circular background. In Light mode, see a Moon icon (Dark) on a circular background.
- 🛠 Foreground Service: Reliable background monitoring that ensures you never miss an alert, even if the app is closed.
- 🛑 Quick Stop Actions: Control your alarms directly from the notification tray with a dedicated "Stop" button.
- Language: Kotlin - Modern, expressive, and safe.
- UI Framework: Material Design 3 (M3) - For a clean, modern, and accessible user interface.
- Architecture: ViewBinding for efficient UI interaction.
- Android APIs Used:
- BatteryManager: For fetching real-time battery statistics.
- Foreground Services: To keep the monitoring active and reliable.
- Broadcast Receivers: To listen for battery state changes efficiently.
- NotificationManager: High-priority notifications with action buttons.
- SharedPreferences: Persistent storage for user settings and preferences.
- MediaPlayer & Vibrator: For immersive alarm alerts.
This project is built for the Open Source community and for the people.
- Free to use & modify: You are encouraged to take this code, learn from it, and adapt it to your needs.
- Non-Commercial: This tool is strictly not for commercial purposes. It is a gift to the community.
- Give Back: If you improve the code, please contribute back to the community so everyone can benefit!
Feel free to fork this project, report issues, or submit pull requests to make it even better!
**Made with ❤️ by OpenSourceIt**



