Minimal Android 14+ screenshot management utility
Kotlin · Jetpack Compose · Material 3
Install · Features · Tech Stack · Getting Started · Permissions · Architecture
ssJanitor monitors newly created screenshots, lets you archive or delete them through lightweight notifications, and automatically cleans up unarchived screenshots on a schedule. Intentionally lightweight, battery-friendly, and aligned with modern Android storage and background execution policies.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- Screenshot Detection — URI-based detection via MediaStore ContentObserver with cold-start initial scan, exponential-backoff retry,
IS_PENDINGcolumn filtering, and fallback scan for edge cases. - Action Notifications — Archive, Keep, or Delete from a dismissible notification.
- Auto-Archive Mode — Long-press the Archived card to auto-archive every new screenshot by default.
- Battery Optimization Opt-Out — Dedicated card with one-tap "Battery Usage" button to disable battery optimization.
- Automatic Cleanup — WorkManager-based daily cleanup removes archived screenshots.
| Layer | Technology |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose + Material 3 Expressive |
| Local Database | Room |
| Background Tasks | WorkManager |
| Storage APIs | MediaStore |
| Notifications | NotificationCompat |
| Architecture | MVVM-lite |
- Open the project in Android Studio.
- Sync Gradle (uses version catalog at
gradle/libs.versions.toml). - Build and run on a device running Android 14+ (min SDK 34).
No API keys, no cloud services, no configuration required.
# Clone the repository
git clone https://github.com/ShubhamJ010/ScreenshotJanitor.git
cd ScreenshotJanitor
# Build debug APK
./gradlew assembleDebug
# Build release APK
./gradlew assembleRelease
# Run unit tests
./gradlew test
# Run lint checks
./gradlew lint<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />READ_MEDIA_IMAGES— Required to query screenshots from MediaStore.POST_NOTIFICATIONS— Required for screenshot action notifications.MANAGE_EXTERNAL_STORAGE— Required for batch deletion of archived screenshots.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS— Required to opt out of battery optimization for reliable background detection.
app/src/main/java/dev/sj010/ssjanitor/
├── core/ — Constants, extensions, utils
├── data/ — Room DB, DAO, entities, repositories
├── notifications/ — Notification manager & action receiver
├── observer/ — ContentObserver & screenshot detection
├── ui/ — Compose screens, components, theme
├── viewmodel/ — ViewModels
├── worker/ — WorkManager cleanup worker
├── MainActivity.kt
└── SsJanitorApp.kt
| Document | Description |
|---|---|
| Architecture | MVVM layers, process flows, component details |
| Features | Detailed feature descriptions |
| Database Schema | Room entities, DAO, repository |
| Notifications | Notification flow & action handling |
| Cleanup Worker | WorkManager-based cleanup pipeline |
| Resource Usage | Foreground / background CPU, memory, and battery profiling |
| Development | Principles, design goals, MVP scope, future ideas |
| Release Signing | Keystore setup, CI signing, troubleshooting |
| Changelog | Release history |
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.





