Ứng dụng Android thông báo khi pin sạc đầy.
| Screen | Preview | Screen | Preview |
|---|---|---|---|
| Home Screen | ![]() |
Settings | ![]() |
- Thông báo pin đầy: Nhận thông báo khi pin đạt mức yêu cầu
- Âm thanh tùy chỉnh: Chọn âm thanh thông báo
- Hiển thị thông tin cơ bản về pin: Nhiệt độ, sức khoẻ, điện app, và công nghệ pin
android {
namespace = "com.base.baterynotification"
compileSdk = 36
defaultConfig {
applicationId = "com.base.baterynotification"
minSdk = 26
targetSdk = 36
versionCode = 1
versionName = "1.0"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
buildFeatures {
viewBinding = true
}
}POST_NOTIFICATIONS- Gửi thông báo khi pin đầyRECEIVE_BOOT_COMPLETED- Khởi động lại dịch vụ sau khi khởi động lại thiết bịFOREGROUND_SERVICE- Chạy dịch vụ theo dõi pin ở chế độ foreground
BatteryFullNotification/
├── app/
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/com/base/baterynotification/
│ │ │ │ ├── data/
│ │ │ │ │ ├── model/ # Data models (BatteryInfo)
│ │ │ │ │ └── repository/ # Repository pattern (BatteryRepository)
│ │ │ │ ├── ui/
│ │ │ │ │ ├── main/ # MainActivity, HomeFragment, MainViewModel
│ │ │ │ │ └── setting/ # SettingFragment, SettingViewModel
│ │ │ │ ├── utils/ # Utility classes
│ │ │ │ │ ├── BatteryUtil.java # Battery helper functions
│ │ │ │ │ ├── BatteryMonitorService.java # Background service
│ │ │ │ │ ├── BatteryCircleView.java # Custom view
│ │ │ │ │ ├── PremiumManager.java # Premium features
│ │ │ │ │ └── Event.java # LiveData event wrapper
│ │ │ │ └── BatteryApp.java # Application class
│ │ │ ├── res/
│ │ │ │ ├── layout/ # XML layouts
│ │ │ │ ├── drawable/ # Icons, shapes
│ │ │ │ ├── values/ # Strings, colors, themes
│ │ │ │ ├── raw/ # Sound files
│ │ │ │ ├── menu/ # Menu resources
│ │ │ │ └── navigation/ # Navigation graphs
│ │ │ └── AndroidManifest.xml
│ │ ├── androidTest/ # Instrumented tests
│ │ └── test/ # Unit tests
│ ├── build.gradle.kts # App-level Gradle config
│ └── proguard-rules.pro # ProGuard rules
├── gradle/
│ ├── libs.versions.toml # Dependencies version catalog
│ └── wrapper/
├── media/ # Screenshots & demo images
├── build.gradle.kts # Project-level Gradle config
├── settings.gradle.kts
├── gradlew
├── gradlew.bat
└── README.md
- Pattern: MVVM (Model-View-ViewModel)
- Repository: BatteryRepository quản lý dữ liệu pin
- ViewModel: MainViewModel, SettingViewModel quản lý UI state
- Service: BatteryMonitorService để theo dõi trạng thái pin
- UI: View Binding với Fragment Navigation
- Async: LiveData & Event wrapper
Distributed under the MIT License. See LICENSE for more information.
Tín Vũ
Made with ❤️ for better battery care

