A lightweight, modern Android application that instantly blocks incoming phone calls from numbers not saved in your contacts.
Features a toggle button directly in the notification shade / Quick Settings (just like Wi-Fi and Bluetooth), allowing you to turn call blocking on or off in a single tap without opening the app.
- ⚡ Instant Call Blocking: Automatically rejects incoming calls from any phone number that isn't saved in your address book.
- 🔄 Dynamic Real-Time Contacts Lookup: Multi-tier dynamic contact verification (
PhoneLookup, cleaned numbers, national suffixes, and direct address book matching) ensuring newly saved contacts are recognized instantly. - 🔘 Two-Way Sync (Tile, Switch & Notification): Real-time bi-directional synchronization between the Quick Settings Tile, persistent notification action button, and the in-app switch.
- 🕵️ Stealth Mode (Hide App Icon): Hide the app icon from your phone's app drawer. Open the app anytime simply by holding (long-pressing) the Quick Settings Tile or tapping the notification.
- 🔇 Zero Ringing & Distraction: Suppresses incoming call ringing and notification sounds so you are never disturbed.
- 📋 Blocked Calls History: View a log of recently blocked calls (number & timestamp) with the ability to clear history.
- 🔋 Battery Efficient & Clean: Uses the official Android Telecom
CallScreeningServiceAPI—it only activates when an incoming call arrives and consumes zero battery in the background.
CallBlocker/
├── app/
│ ├── src/main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/com/simplecallblocker/
│ │ │ ├── CallBlockerScreeningService.java # CallScreeningService: catches & rejects unknown calls
│ │ │ ├── CallBlockerTileService.java # TileService: Quick Settings tile (like Wi-Fi/BT)
│ │ │ ├── NotificationHelper.java # Ongoing notification & blocked alerts
│ │ │ ├── ToggleReceiver.java # Handles notification action button clicks
│ │ │ ├── BootReceiver.java # Restores notification on reboot
│ │ │ ├── BlockerPreferences.java # SharedPreferences storage & state management
│ │ │ ├── BlockedCallItem.java # Data model for blocked call log
│ │ │ ├── BlockedCallsAdapter.java # RecyclerView adapter for call history
│ │ │ └── MainActivity.java # User interface & permission setup checklist
│ │ └── res/
│ │ ├── layout/ # activity_main.xml & item_blocked_call.xml
│ │ ├── values/ # colors, strings, themes (Light & Dark)
│ │ └── drawable/ # Vector icons & card backgrounds
├── build.gradle
├── settings.gradle
└── gradlew
-
Call Screening (
CallScreeningService):- When an incoming call arrives, Android Telecom binds to
CallBlockerScreeningService.onScreenCall(). - The app verifies whether the blocker is enabled.
- The incoming phone number is queried against
ContactsContract.PhoneLookup. - If the number is not found in contacts:
CallResponse.Builder response = new CallResponse.Builder() .setDisallowCall(true) // Drops incoming connection .setRejectCall(true) // Disconnects immediately .setSkipNotification(true) // Suppresses ringing and incoming heads-up .setSkipCallLog(false); // Keeps call in phone log so you know someone called respondToCall(callDetails, response.build());
- If the number is in contacts, the call passes through completely untouched.
- When an incoming call arrives, Android Telecom binds to
-
Quick Settings Tile (
TileService):CallBlockerTileServiceregisters with the Android System UI.- Tapping the tile immediately flips the blocker state, updates tile appearance (Active/Inactive), and synchronizes with the notification and app UI.
-
Notification Toggle Button:
NotificationHelpercreates an ongoing notification with an action button ([ Pause ]or[ Activate ]).- Tapping the button fires
ToggleReceiverwithout bringing any activity to the foreground.
You don't need Android Studio or the Android SDK installed on your computer.
- Push this repository to GitHub:
cd CallBlocker # Create a repository on GitHub, then link and push: git remote add origin https://github.com/<YOUR_USERNAME>/<YOUR_REPO>.git git branch -M main git push -u origin main
- Download the compiled APK:
- Go to your repository on GitHub.
- Click the Actions tab at the top.
- Select the latest "Build Android APK" workflow run.
- Under Artifacts, download
CallBlocker-Debug-APK.zip. - Extract and install the
app-debug.apkdirectly on your Android phone!
(Tip: Pushing a version tag like git tag v1.0.0 && git push origin v1.0.0 will also automatically publish the APK to the repository's GitHub Releases page!)
- Launch Android Studio.
- Select Open and choose the
CallBlockerdirectory. - Allow Gradle to sync.
- Connect your Android phone (or launch an emulator) with USB debugging enabled.
- Click Run ▶ (Shift + F10).
cd CallBlocker
./gradlew assembleDebugThe output APK will be generated at:
app/build/outputs/apk/debug/app-debug.apk
To install directly to a connected device via ADB:
adb install -r app/build/outputs/apk/debug/app-debug.apk- Open Call Blocker:
- Open the app on your phone.
- Grant Permissions (3 Simple Steps shown on screen):
- Step 1 - Call Screening App: Tap "Grant" and select Call Blocker as your default Caller ID & Spam / Call Screening app.
- Step 2 - Contacts: Tap "Grant" so the app can verify saved contacts.
- Step 3 - Notifications: Tap "Grant" (required on Android 13+) to enable the toggle notification.
- Add the Quick Settings Tile (Like Wi-Fi / Bluetooth):
- Swipe down twice from the top of your screen to open the full Quick Settings panel.
- Tap the Edit / Pencil icon (usually in the bottom or top corner).
- Scroll down to find the "Block Unknowns" tile.
- Drag and drop it into your active tiles list next to Wi-Fi and Bluetooth.
- Done! You can now toggle call blocking anytime right from your quick settings panel.