Skip to content

Repository files navigation

AlarmControl

English | 한국어

An offline-first Android notification filter with rules, local analytics, and on-device AI.

AlarmControl evaluates notifications on your phone and can cancel, snooze, keep, or record them according to rules you control. The installed app has no account, telemetry, cloud service, model download, or INTERNET permission. Notification data stays on the device.

Scope: AlarmControl handles notifications only after Android posts them. It does not schedule alarms, intercept a system alarm that has no notification, mark another app's notification as read, or guarantee that a heads-up notification never appears.

Distribution: GitHub Releases is the intended binary channel. New releases built from this version publish five APKs signed with the same update key (universal, arm64-v8a, armeabi-v7a, x86, and x86_64), plus a matching .sha256 file for each. Download one APK for your device and the checksum with the same variant name. Earlier releases may provide only the valid universal pair. GitHub's source archives are not Android installers.

Releases · User guide · Privacy · Build from source

Quick start

  1. Use Android 8.0 or later.
  2. Download one signed APK for your device—usually arm64-v8a, or universal if unsure—and its matching checksum from the same GitHub Release.
  3. Allow Install unknown apps only for the browser or file manager opening the APK.
  4. Open AlarmControl and grant Notification access.
  5. Create a Monitor rule first.
  6. Review its predictions under Insights → Records.
  7. Change the rule to Active only after its matches are safe.

The bundled classifiers work without any additional model file. The optional generative LLM is not required for normal filtering. The seven-intent classifier is enabled by default and can be turned off under Settings → Smart notification sorting → Sort notifications by content.

See the user guide for checksum commands, updates, backup, safe rule setup, automation, and troubleshooting.

What it does

  • Rules first: match an app, channel, title or text, Android category, time, frequency, importance, conversation state, foreground-service state, local ML category, or semantic intent.
  • Safe evaluation modes: Monitor records what would happen without changing the notification. Active may perform the first matching action, ordered by rule priority.
  • Honest actions: Cancel and Snooze call Android notification APIs. Keep and Log only are record-only decisions with no hidden platform side effect.
  • On-device categorization: bundled local models classify broad categories and seven semantic intents. The seven-intent model can be disabled independently; disabled, missing, ambiguous, timed-out, or low-confidence semantic results fail open.
  • Local learning: explicit label corrections adjust package-level predictions locally without runtime backpropagation or data export.
  • Insights and records: review activity, date-range trends, app/channel/rule breakdowns, decision traces, and conservative rule suggestions.
  • English and Korean UI: follow the system language or choose either language inside Settings.
  • Profiles and automation: group rules into profiles and control them from the app, Quick Settings, launcher shortcuts, Samsung Modes and Routines, Tasker, or MacroDroid.
  • Local backup and restore: export rules, profiles, selected settings, and daily summaries to a user-chosen file with optional password-based encryption.

A safe rules workflow

AlarmControl has independent Active and Monitor lanes:

  • Monitor never cancels or snoozes. It records the predicted action so you can inspect it.
  • Active may cancel or snooze the notification after a trusted match.
  • Higher priority rules run first within each lane.
  • An unavailable signal is UNKNOWN, not a match.
  • High-priority Keep rules can visibly protect alarms, calls, conversations, ongoing services, or important alerts.

New destructive drafts start in Monitor mode. Templates and suggestions open editable drafts; they are never saved or enabled automatically. The rule editor also includes a simulator that does not touch real notifications.

The detailed condition and priority behavior is documented in the rules guide.

Privacy by construction

  • Final merged app and test APK manifests do not grant android.permission.INTERNET.
  • Runtime modules contain no network client, analytics uploader, crash uploader, or remote model fetcher.
  • Ordinary activity records contain metadata, not notification title or body text.
  • Eligible notification detail storage is on by default with seven-day retention. Users can choose 1, 3, 7, 14, or 30 days, or turn storage off. Future title/body content is length-bounded and encrypted with an Android Keystore AES-256-GCM key. Secret notifications and excluded apps are never stored.
  • Notification content, LLM reasoning, automation tokens, passwords, and encryption keys are never included in portable backups.
  • Android OS cloud backup is disabled. User-directed backup and model pickers request local providers only.

See Privacy and local data for the complete storage and deletion boundaries.

On-device AI

Normal filtering includes two bundled local paths:

  1. A lightweight category classifier for labels such as promotion, social, news, and alarm.
  2. A seven-intent semantic encoder for MARKETING, TRANSACTIONAL, SECURITY, DELIVERY, SOCIAL, OTHER, and AMBIGUOUS.

Only trusted bundled semantic results may become an Active-rule signal. The model and its vocabulary, labels, and manifest are hash-bound assets. Classification failure leaves the notification unchanged.

A user-built, self-contained MediaPipe .task generative model can be imported manually from local storage for compatibility checks. AlarmControl does not provide, train, or download that model. The current build verifies storage integrity and native loading only: it has no verified automatic background profile or manual inference screen, so an unverified import is not routed to notification analysis.

The bundled encoder pipeline lives in ml/semantic-training. The fixed contract for preparing a user-supplied generative model is documented in the custom LLM guide.

Installation and updates

Verify the APK checksum before installation when practical. A checksum confirms that the APK matches the file listed in the same release; it does not independently certify the publisher. Android's package signature then enforces signing-key continuity for updates.

Install a newer APK over the existing app. Do not uninstall first: uninstalling removes local app data. Android accepts an in-place update only when the new APK has a higher versionCode and the same signing key. AlarmControl does not check GitHub or update itself.

GitHub does not select an APK for the device as Google Play does. Most modern phones and tablets use arm64-v8a; older 32-bit ARM devices use armeabi-v7a; x86 and x86_64 are mainly for emulators and special Intel-based devices. Choose universal if unsure. Download and install only one variant and verify it with the checksum carrying the same variant name.

All five APKs contain the same bundled lightweight semantic classifier. The optional generative LLM is a separate user-provided file and is never bundled in any APK.

Detailed installation, checksum, development-build migration, and recovery guidance is in the user guide.

Automation

Samsung Modes and Routines uses AlarmControl's first-party App Shortcuts and does not require an automation token. Quick Settings and launcher shortcuts use the same local profile controller.

Tasker, MacroDroid, and compatible tools use a separate explicit broadcast contract. That route is off by default and requires the per-install token shown in Settings. Implicit broadcasts are rejected and requests are locally rate-limited.

See Automation: Samsung Routines, Tasker, and MacroDroid.

Documentation

Document Purpose
User guide Installation, first setup, everyday use, backup, and troubleshooting
Rules guide Conditions, priorities, Monitor/Active behavior, and platform limits
Automation guide Samsung Routines, Quick Settings, Tasker, and MacroDroid
Privacy and local data Stored data, encryption, retention, backup, and deletion
Custom LLM guide Contract for training, converting, and importing a user-supplied .task
Build guide Toolchain, tests, signing, and GitHub Release preparation
Architecture rules Locked offline, privacy, module, and release constraints

Build from source

The project uses JDK 17, the Gradle wrapper, and Android SDK 36.

export JAVA_HOME="$(/usr/libexec/java_home -v 17)"
./gradlew assembleDebug
./gradlew check

assembleDebug creates an automatically debug-signed development APK. A distributable GitHub APK must instead use the long-lived release key and pass :app:releaseCandidate; see BUILD.md. Never commit a keystore or signing credentials.

Architecture

AlarmControl uses Kotlin, Coroutines/Flow, Jetpack Compose, Hilt, Room, DataStore, WorkManager, LiteRT, and optional MediaPipe Tasks GenAI.

Module Responsibility
:app Compose UI, navigation, dependency wiring, and notification-listener entry point
:core Framework-free models and repository contracts
:data Room, DataStore, backup, encryption, and repository implementations
:ml Bundled classifiers, local feedback, and optional local LLM boundary
:notifications Pure Kotlin rule matching and explanation logic
:automation Authenticated intents, shortcuts, profiles, and Quick Settings
:baselineprofile Build-only startup profile and benchmark tooling

The release gates verify formatting, static analysis, tests, dependency integrity, offline manifests/classpaths, model assets, APK payload limits, and APK signature validity. A compiled or unsigned APK/AAB is not a publishable release.

License

Copyright 2026 SLemon418.

AlarmControl is licensed under the Apache License 2.0.

About

Offline-first Android notification filtering with on-device AI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages