Skip to content

Agentry433/CallGuard

CallGuard β€” Call Blocker for Android

License Android Kotlin API

CallGuard is an Android application for blocking unwanted incoming and outgoing calls based on number masks and contact list. The app uses Android system APIs (Call Screening and Call Redirection) for efficient call filtering.

πŸ“± Features

πŸ”’ Incoming Call Blocking

  • Number masks β€” Set masks (e.g., +7900*, 8495*) to block entire number ranges
  • Block unknown callers β€” Reject calls from numbers not in your address book
  • Automatic filtering β€” Uses system CallScreeningService to block calls before your phone rings

πŸ›‘οΈ Outgoing Call Protection

  • Outgoing call verification β€” Control outgoing calls to numbers outside your contacts
  • Protection modes:
    • Off β€” no restrictions
    • Warning β€” shows notification before calling
    • Block β€” completely blocks the call

πŸ“ Event Log

  • Logging β€” All incoming and outgoing calls are recorded with details
  • Decision history β€” See which calls were blocked and why

πŸ” App Lock

  • Password protection β€” Set a password to protect settings and blocking rules
  • Privacy β€” No one can change your rules without authorization

🌐 Multilingual Support

  • Russian β€” Full Russian language support
  • English β€” Full English translation
  • Switching β€” Change language directly within the app

πŸ“‹ Requirements

  • Android 7.0+ (API 24)
  • Android 10+ for outgoing call protection (API 29)
  • Device with telephony support (not a tablet without SIM)
  • Contacts permission (optional, for blocking unknown callers)

πŸš€ Installation

From Source Code

  1. Clone the repository:

    git clone https://github.com/YOUR_USERNAME/CallGuard.git
    cd CallGuard
  2. Open in Android Studio:

    • Launch Android Studio
    • Select File > Open
    • Navigate to the project folder
  3. Build the project:

    ./gradlew assembleDebug
  4. Install the APK:

    adb install app/build/outputs/apk/debug/app-debug.apk

Manual Installation

  1. Download APK from the Releases section
  2. Enable installation from unknown sources in device settings
  3. Install the APK

πŸ“– Usage

Activating Incoming Call Blocking

  1. Open the app
  2. Click "Activate Service"
  3. In the dialog, select "Use as call screening app"
  4. The app will receive ROLE_CALL_SCREENING role

Configuring Masks

  1. Go to the "Main" tab
  2. Click the + button (floating action button at bottom right)
  3. Enter a number or mask:
    • Exact number: +79851234567
    • Mask (prefix): +7900*, 8495*
  4. Click "Save"

Blocking Unknown Numbers

  1. Go to the "Settings" tab
  2. Enable the "Block numbers not in contacts" switch
  3. Grant contacts permission if prompted

Activating Outgoing Call Protection

  1. Go to the "Settings" tab
  2. Click "Activate Protection"
  3. Select "Use as call redirection app"
  4. Choose a mode: Off, Warning, or Block

Setting a Password

  1. Go to the "Settings" tab
  2. Click "Set Password"
  3. Enter and confirm your password (minimum 6 characters)

πŸ—οΈ Architecture

Key Components

Component Description
CallBlockerService CallScreeningService for blocking incoming calls
OutgoingCallRedirectionService CallRedirectionService for verifying outgoing calls
MaskPrefs Mask storage in SharedPreferences
ScreeningEventLog Call event logging
ContactsLookup Check if number exists in contacts
AppLanguageManager UI language management
AppLockPrefs App password management

Android APIs Used

  • CallScreeningService (API 24+) β€” incoming call blocking
  • CallRedirectionService (API 29+) β€” outgoing call verification
  • RoleManager β€” obtaining system roles
  • ContentResolver β€” contacts access

🀝 Contributing

We welcome contributions! Please read CONTRIBUTING.md for guidelines.

Quick Start

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Standards

πŸ“ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Contact

❓ FAQ

Why isn't the app blocking calls?

Make sure that:

  1. You have activated the service and obtained ROLE_CALL_SCREENING
  2. The mask is configured correctly
  3. Call Screening is supported on your device (Android 7.0+)

Can I use it on a tablet?

Call Screening requires a device with telephony support (with SIM card). The feature may not be available on tablets without SIM.

Where is data stored?

All data (masks, password, log) is stored locally in the app's SharedPreferences. No data is sent to any server.

How do I reset the password?

If you forgot your password, clear the app data in Android settings: Settings > Apps > CallGuard > Storage > Clear Data.

πŸ’° Support the Project

If you find CallGuard useful, you can support the development with a donation:

TON Wallet:

UQD-RzivaF2yxBF81Zzf44WE84Y3pS24QL751Z5nYC3PosRJ

Donate TON

Every donation helps keep the project alive and motivates further development. Thank you! ❀️


Made with ❀️ for protecting against unwanted calls

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages