{"id":50372044,"url":"https://github.com/adamff-dev/hushify","last_synced_at":"2026-05-30T07:31:05.014Z","repository":{"id":357694688,"uuid":"1238141701","full_name":"adamff-dev/hushify","owner":"adamff-dev","description":"Android app that mutes Spotify ads","archived":false,"fork":false,"pushed_at":"2026-05-22T16:07:49.000Z","size":186,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T20:45:52.567Z","etag":null,"topics":["ad-block","ad-free","ads","music","mute","spotify"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamff-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-13T21:15:34.000Z","updated_at":"2026-05-22T16:06:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/adamff-dev/hushify","commit_stats":null,"previous_names":["adamff-dev/hushify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adamff-dev/hushify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamff-dev%2Fhushify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamff-dev%2Fhushify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamff-dev%2Fhushify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamff-dev%2Fhushify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamff-dev","download_url":"https://codeload.github.com/adamff-dev/hushify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamff-dev%2Fhushify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33684413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ad-block","ad-free","ads","music","mute","spotify"],"created_at":"2026-05-30T07:31:04.951Z","updated_at":"2026-05-30T07:31:05.008Z","avatar_url":"https://github.com/adamff-dev.png","language":"Kotlin","funding_links":["https://www.paypal.com/donate/?hosted_button_id=3T9XNAPWW36Z2","https://www.buymeacoffee.com/rsiztb3","https://ko-fi.com/adamffdev"],"categories":[],"sub_categories":[],"readme":"# Hushify\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"art/ic_launcher.svg\" alt=\"Hushify Logo\" width=\"128\" height=\"128\" /\u003e\n\u003c/p\u003e\n\nA lightweight, open-source, privacy-first Android utility designed to **automatically mute Spotify advertisements** in real-time. By utilizing deep on-device notifications analysis and media session heuristics, Hushify detects advertisements in seconds and lowers system media volumes to zero. \n\nHushify operates **completely on-device** without requiring Spotify account linking, API access, or internet permissions.\n\n---\n\n## 🚀 Key Features\n\n* **Instant Ad Muting**: Dynamically lowers the multimedia stream (`STREAM_MUSIC`) and Bluetooth SCO channels (volume index 6) to zero the millisecond an advertisement begins.\n* **Smart Volume Restoration**: Captures your current playback volume right before muting and restores it perfectly when the advertisement ends.\n* **Dual-Channel Protection**: Seamlessly mutes wired/wireless headsets, Bluetooth speakers, and native device speakers.\n* **Advanced Multi-Heuristic Detection**:\n  * **System Flags**: Scans standard Android `MediaMetadata.METADATA_KEY_ADVERTISEMENT` markers.\n  * **Media URI Analysis**: Inspects player tracks for Spotify's internal ad identifier prefix (`spotify:ad:`).\n  * **Multilingual Heuristic Engine**: Scans text payloads against 51 unique localized ad phrases (extracted from official Spotify APK resources) spanning dozens of languages.\n* **Anti-Latency Framework**: Eliminates audio bleed-through using dynamic audio routing callbacks and high-priority notification triggers.\n* **Resilient Playback Debouncing**: Avoids unmuting during track changes or when playback is paused to prevent volume spikes.\n* **Auto-Open Spotify**: Optional configuration to automatically launch the Spotify app immediately after opening Hushify.\n* **Auto-Shutdown on Spotify Inactivity**: If Spotify is idle (e.g., you close the player or stop music) for 15 minutes, Hushify automatically stops its listener, releases background resources, and shuts down the UI to conserve battery.\n* **Automatic Boot Recovery**: Optionally restarts the keep-alive listener on system reboot (`RECEIVE_BOOT_COMPLETED`) so you're always protected hands-free.\n* **100% Privacy \u0026 Security**: Processes all heuristics locally on-device. No network access, no trackers, and no data collection.\n\n---\n\n## 🛠️ How It Works (Under the Hood)\n\n1. **Service Registration**: Hushify uses Android's `NotificationListenerService` API to securely monitor notification events generated *only* by `com.spotify.music`.\n2. **Media Session Hooking**: The service integrates with `MediaSessionManager` to capture real-time playback state updates and `MediaMetadata` changes directly from the media controllers.\n3. **Multi-Heuristic Engine**: When a Spotify update occurs, the app runs three parallel checks:\n   * Checks if the `android.media.metadata.ADVERTISEMENT` long value equals `1`.\n   * Checks if the media identifier starts with `spotify:ad:`.\n   * Runs an optimized, accent-folded text heuristic searching for matches in the notification title, text, subtext, actions, ticker text, and media session metadata against the compiled localized ad phrases dictionary.\n4. **Volume Capture and Suppression**:\n   * Upon ad detection, the app stores the current volume for `STREAM_MUSIC` and Bluetooth SCO.\n   * Volume is immediately suppressed to `0`.\n   * An active `AudioDeviceCallback` watches for audio hardware changes (e.g., plugging in headphones mid-ad) to re-apply the suppression instantly.\n5. **Debounced Restore**: Once the ad signature clears and playback resumes as active, the volume is restored back to the cached levels.\n\n---\n\n## 📱 User Preferences \u0026 Options\n\nHushify features a modern, clean, edge-to-edge UI built entirely using **Jetpack Compose** that makes configuration a breeze:\n\n* **Notification Access Toggle**: One-tap shortcut to grant special notification permissions.\n* **Battery Restrictions Toggle**: Opens system settings to allow **Unrestricted** background processing, preventing the OS from killing the listener.\n* **Open Spotify after opening Hushify**: When enabled, launching Hushify automatically starts Spotify so you can get straight to your music.\n* **Close app when Spotify is idle**: Auto-terminates Hushify's foreground listener and UI after 15 minutes of Spotify inactivity to preserve resources.\n\n---\n\n## 📋 Requirements\n\n* Android **7.0+** (API 24 or higher)\n* Official **Spotify** Android app installed\n* **Notification Access**: Must be enabled under **Settings → Apps → Special access → Notification access**\n* **Unrestricted Battery Usage** (highly recommended for background longevity on aggressive OEM battery managers)\n\n---\n\n## 🔒 Permissions Breakdown\n\n| Permission | Scope | Technical Purpose |\n| :--- | :--- | :--- |\n| `BIND_NOTIFICATION_LISTENER_SERVICE` | System | Reads Spotify notification text and metadata for ad heuristics. |\n| `MODIFY_AUDIO_SETTINGS` | Audio | Adjusts stream volumes (`STREAM_MUSIC` \u0026 Bluetooth SCO) to mute and restore audio. |\n| `FOREGROUND_SERVICE` | Keep-alive | Runs the keep-alive service so the application maintains persistence in the background. |\n| `FOREGROUND_SERVICE_TYPE_SPECIAL_USE` | Keep-alive | Adheres to Android 14+ (API 34) requirements for background listener classification. |\n| `POST_NOTIFICATIONS` | Local UI | Enables Hushify to show the keep-alive notification and active-mute status on Android 13+. |\n| `REQUEST_IGNORE_BATTERY_OPTIMIZATIONS` | Battery | Directs you to the system battery page to exempt Hushify from aggressive power savings. |\n| `RECEIVE_BOOT_COMPLETED` | Boot | Restores the listening service seamlessly after device restart. |\n\n---\n\n## 🏗️ Build \u0026 Development\n\nTo build the APK from the command line:\n\n```bash\n./gradlew assembleDebug\n```\n\nAlternatively, open the project in **Android Studio** (Koala or newer recommended). The project is built using:\n* Kotlin 1.9+\n* Gradle 8.0+\n* Jetpack Compose (Material 3)\n* Kotlin DSL (`build.gradle.kts`) and Version Catalog (`gradle/libs.versions.toml`)\n\n---\n\n## ⚠️ Limitations \u0026 Disclaimers\n\n* **Heuristics Dependent**: Ad detection relies entirely on what Spotify exposes via its system notification and media metadata. If an ad contains no advertisement flags, ad URIs, or localized ad texts, the app will not mute it.\n* **Language Support**: Includes translations and heuristics for 51 languages, but may experience rare false positives or misses on custom modified Spotify clients or regional variants.\n* **Affiliation**: Hushify is **not** affiliated, associated, authorized, endorsed by, or in any way officially connected with Spotify AB or any of its subsidiaries.\n\n---\n\n## 💝 Support the Project\n\nHushify is entirely open-source, free, and developed out of passion. If it makes your music experience better, consider supporting development and maintenance:\n\n### 💳 Traditional Platforms\n* **PayPal**: [Donate via PayPal](https://www.paypal.com/donate/?hosted_button_id=3T9XNAPWW36Z2)\n* **Buy Me a Coffee**: [Buy Me a Coffee](https://www.buymeacoffee.com/rsiztb3)\n* **Ko-fi**: [Support on Ko-fi](https://ko-fi.com/adamffdev)\n\n### 🪙 Cryptocurrency Donations\nIf you prefer decentralized support, you can copy the wallet addresses below:\n\n* **Bitcoin (BTC)**: `bc1qrcdyq2yjgv5alm9kky2e6vyfhnafn3wgd2gjls`\n* **Ethereum (ETH)**: `0x43b9649985d6789452abe23beb1eb610cee88817`\n* **Solana (SOL)**: `4qK7eSQemRj85VY9CQp5XHRwX5fNjoSJ1ou4gmqk6jtM`\n* **Litecoin (LTC)**: `ltc1qp6mya23a73n36dc7r0tfwfphn2v53phmhen99j`\n\nYour support is deeply appreciated! Thank you! 🙌\n\n---\n\n## 📄 License\n\nThis repository does not currently include a formal open-source license. Feel free to use the utility on your personal devices. If you plan to republish, fork, or accept external contributions commercially, please reach out or add an appropriate license file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamff-dev%2Fhushify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamff-dev%2Fhushify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamff-dev%2Fhushify/lists"}