Skip to content

ShubhamJ010/ScreenshotJanitor

Repository files navigation

ssJanitor

ssJanitor

Minimal Android 14+ screenshot management utility

Kotlin · Jetpack Compose · Material 3

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.

Screenshots

Screenshot 1 Screenshot 2 Screenshot 3
Screenshot 4 Screenshot 5 Screenshot 6

Features

  • Screenshot Detection — URI-based detection via MediaStore ContentObserver with cold-start initial scan, exponential-backoff retry, IS_PENDING column 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.

Detailed feature docs →

Tech Stack

Layer Technology
Language Kotlin
UI Jetpack Compose + Material 3 Expressive
Local Database Room
Background Tasks WorkManager
Storage APIs MediaStore
Notifications NotificationCompat
Architecture MVVM-lite

Getting Started

  1. Open the project in Android Studio.
  2. Sync Gradle (uses version catalog at gradle/libs.versions.toml).
  3. Build and run on a device running Android 14+ (min SDK 34).

No API keys, no cloud services, no configuration required.

Install with Obtainium

Easily receive updates directly from GitHub Releases using Obtainium.

Get it on Obtainium

If Obtainium is installed on your device, tapping the badge will import this app automatically.

Permissions

<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.

Project Structure

app/src/main/java/com/example/screenshotjanitor/
├── 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

Documentation

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
Changelog Release history

License

MIT

About

Clean up your screenshot clutter automatically. ssJanitor detects new screenshots, lets you archive or delete them from a notification, and sweeps away the rest on schedule. Material 3 Expressive design. No cloud, no fuss, no clutter.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages