Skip to content

Latest commit

ย 

History

History
137 lines (98 loc) ยท 4.15 KB

File metadata and controls

137 lines (98 loc) ยท 4.15 KB

๐Ÿ“ฑ SimpleBatteryNotifier

Android CI Android Java License

A lightweight Android app to keep you informed about your battery status โ€” without heavy resource usage or unnecessary "power saver" bloat.

๐Ÿ’ก Why SimpleBatteryNotifier?

Ever been busy at work or home and suddenly realized your phone is almost out of battery?
Or worse โ€” your phone dies while youโ€™re traveling and you canโ€™t recharge it.

Unlike heavy battery saver apps (which Android doesnโ€™t actually need), SimpleBatteryNotifier is designed to:

  • Monitor your battery efficiently
  • Send you timely notifications
  • Avoid slowing down your phone or draining your resources

No surprises. No clutter. Just simple battery notifications.


โœจ Features

  • ๐Ÿ”‹ Battery Alerts

    • Get notified at Critical and Warning levels
    • Receive an alert when charging is complete
  • โฐ Customizable Notifications

    • Choose when to get notified (e.g., no alerts while youโ€™re sleeping)
    • Customize notification sounds, vibration, and behavior
  • ๐Ÿ“ก Full Charge Notification

    • Helpful if you charge your phone in Airplane Mode for faster charging โ€” youโ€™ll get reminded not to forget it there
  • ๐Ÿ“Š Battery Insights

    • Extra details like temperature, health, and more
  • ๐Ÿ“Œ Persistent & Repeated Alerts

    • Keep a permanent battery status notification if you tend to forget things
    • Optionally receive alerts for every 1% drop when at critical levels

๐Ÿš€ Lightweight & Simple

  • No unnecessary background services
  • No bloated โ€œpower saverโ€ features
  • Just the essentials to keep you in control of your battery

๐Ÿ“ฅ Installation

(Add installation instructions here, e.g., link to Google Play or APK download)


๐Ÿ› ๏ธ Development

Building from Source

# Clone the repository
git clone https://github.com/almothafar/SimpleBatteryNotifier.git
cd SimpleBatteryNotifier

# Build debug APK
./gradlew assembleDebug

# Build release APK
./gradlew assembleRelease

# Run unit tests
./gradlew test

Requirements

  • JDK 25+ (Java 25)
  • Android SDK 36 (compileSdk)
  • Gradle 9.2+

Testing

The project includes 11 focused unit tests covering critical business logic:

  • BatteryDO calculation logic - Percentage calculation with edge cases
  • Division by zero handling - Tests defensive programming
  • Negative values and boundary conditions - Real-world edge cases
  • Builder pattern validation - Method chaining correctness

Run tests with:

./gradlew test

View test reports at:

app/build/reports/tests/testDebugUnitTest/index.html

CI/CD

Every pull request and push to master automatically:

  • โœ… Runs unit tests
  • โœ… Builds debug and release APKs
  • โœ… Generates test reports
  • โœ… Uploads build artifacts

Check the Actions tab for build status.


๐Ÿค Contributing

Pull requests and suggestions are welcome!

Before submitting:

  1. Ensure all tests pass: ./gradlew test
  2. Follow the coding guidelines in .claude/guidelines.md
  3. Add tests for new features
  4. Update documentation as needed

๐Ÿ“„ License

Licensed under the Apache License, Version 2.0 - see the LICENSE file for details.


๐Ÿ† Code Quality

  • โœ… Focused unit tests (11 tests, 100% pass rate)
  • โœ… Zero critical bugs
  • โœ… Full accessibility support (TalkBack compatible)
  • โœ… Modern Java 25 features (switch expressions, pattern matching, records)
  • โœ… Clean architecture (SOLID principles, DRY)
  • โœ… Comprehensive documentation (~90% JavaDoc coverage)
  • โœ… CI/CD pipeline (GitHub Actions)

Made with โค๏ธ for battery-conscious Android users