Skip to content

jiemachina/SpamBlocker

 
 

Repository files navigation

SpamBlocker

An Android Call/SMS blocker. (Android 10+)

Get it on F-Droid

Screenshot

Call SMS Setting Notification

Features

For Call For SMS
What it does Block unwanted calls Silence unwanted notificaions
What it doesn't Replace the default call app Replace the default SMS app
How it works Act as CallScreeningService,
aka the default caller ID & spam app
It takes over the notification of new messages.
Filters supported
(explained below)
1. Phone number (regex)
2. Contacts
3. STIR
4. Repeated call
5. Recent apps
6. Dialed
1. Phone number (regex)
2. Contacts
3. SMS content (regex)

Filters:

Filter It checks
Contacts Whether it's from a contact
STIR STIR attestation result
Repeated Whether the number has been calling repeatedly
Dialed Whether the number has been made outgoing calls
Recent Apps If some specific apps have been used recently, all calls are allowed.

A typical use case:
 You ordered a pizza in PizzaApp, soon they call you to refund because they are closing. That call would be permitted if PizzaApp is enabled in this list.
Off Time A time period that always permits calls, usually no spams at night.
Regex Pattern Some typical patterns:
- Any number: .* (the regex .* is identical to the wildcard * in many other apps)
- Exact number: 12345
- Starts with 400: 400.*
- Ends with 123: .*123
- Shorter than 5: .{0,4}
- Longer than 10: .{11,}
- Starts with 400, has country code 11 or not: (?:11)?400.*
- Contains "verification": .*verification.*
- Extract verification code from SMS message: code.*?(\d+)

You can ask AI to generate or explain regex for you:
  "Show me regex for checking if a string starts with 400 or 200"
  Results in (400|200).*

Permissions (all optional)

Permission Why
ANSWER_PHONE_CALLS Reject, Answer and Hang-up calls
POST_NOTIFICATIONS Show notifications
READ_CONTACTS For matching contacts
RECEIVE_SMS For receiving new messages
READ_CALL_LOG
READ_SMS
For feature: Repeated Call/Dialed (check if it's repeated)
PACKAGE_USAGE_STATS For feature: Recent Apps
For checking whether an app has been used recently
READ_PHONE_STATE For block mode: Answer + Hang-up (monitor ringing state)

FAQ & Troubleshooting

Problem Solution
SMS notification doesn't work after app is killed Enable "app auto start" in battery settings:
  System Settings -> Battery -> ... -> Auto-start Manager -> enable SpamBlocker
How to always block particular number regardless of how many times it repeats, or within OffTime, etc... Set a regex rule with higher priority than 10.

Languages supported

Languages are translated using Gemini AI(golang script), fire an issue for requesting a new language support.

About

Android Call/SMS blocker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 97.7%
  • Go 2.3%