All one hundred eight build stories
SAIFULLAH AHAD / BUILD STORY
How to block spam calls on Android, and what a blocker really does
To block spam calls, Android gives you a built-in number list, and a blocker app adds more checks on top. Here is what each layer does when a call comes in, and where each one stops.
Three layers you can use today
Start with what the phone already has. The Australian government's online safety program Be Connected, run by the eSafety Commissioner, says in its guide How to block a number on an Android phone:
"You can set up your Android phone to automatically decline calls and text messages from certain phone numbers."
- The phone's own block list. Open the Phone app, then its settings, and add the numbers you do not want. It only knows the numbers you give it, so a spammer who changes number gets through again.
- A call-screening app. People who search for call screening android settings are usually after this layer: Android lets one app you choose look at each incoming call before it rings, and that app decides what happens to it.
- Your own habits. Do not give out passwords or bank details to a caller you did not expect. Be Connected puts it this way in How to stop unwanted calls: "Never give out your password, personal or banking details over the phone to someone who has called you unexpectedly."
Apps in the second layer work in different ways. The same Be Connected guide describes the common kind: "They do this by matching the incoming call to their large database of black-listed phone numbers." It also tells you to "read up on their privacy policy to see what type of access to your contacts and data they require". That is a fair thing to check for any blocker, mine included, and the permissions part below lists exactly what Hajiz asks for.
What Hajiz does when a call comes in
I built Hajiz: Call & SMS Blocker as a call-screening app. Once you set it as the phone's call-screening app, Android hands it each incoming call before the phone rings. The decision is made on the phone itself, and the app checks in this order:
- Your trusted numbers. A number you added to "Always allow" is never blocked, and nothing else in the app can override that.
- Your blocked numbers. A number on your own block list is rejected.
- A list of known spam numbers, if one is installed. The app can refresh such a list once a day. A number found there is rejected.
- Number patterns. Two clear patterns are rejected: numbers that start with one of four premium-rate prefixes, and numbers of six or more digits that are all the same digit. A few softer patterns are only flagged, and the call still rings.
When the app rejects a call, it does so before the ring and without a notification. It keeps the entry in the phone's own call log, so nothing is hidden from you, and it adds the call to its own list under the "Blocked" tab.
Four example numbers
The pattern check is simple on purpose. These four cases show where it blocks and where it only flags:
Six digits, all the same. That is the "same digit six or more times" pattern.
Seven digits in a strict run. A soft signal, so the call is not rejected.
Four digits is too short for a normal call. Flagged only. It is not a run of seven, so only the short-number signal applies.
A hidden caller has no digits to check, so the app flags it and lets it ring.
The soft signals ring on purpose. The app is built to be careful, so it rejects only the clear patterns and lets doubtful calls through.
Your rules, and spam texts
The "Rules" tab holds two lists, "Blocked numbers" and "Always allow", and a plus button to add a rule. In the add dialog you type a phone number and choose "Block" or "Allow". Each saved number has a "Remove" button, in the same spirit as the red minus sign Be Connected describes for the phone's own list.
Texts work differently from calls. Hajiz scores the message on the phone, looking at words such as prize or claim, links, link shorteners, and money mentioned together with urgency. If it decides a message is spam, it writes it to the Blocked list and posts a quiet alert that names the sender, not the message. The message still arrives in your messaging app. Silent filtering of texts would need Hajiz to be the phone's default text app, and it is not one. Be Connected adds a useful warning here: "Keep in mind spammers can change their phone number so you may need to block their message again as and when they appear."
The permissions, said plainly
Hajiz asks for as little as it can. The app's manifest lists four permissions, plus one role that is not a permission:
- Call-screening role. Not a runtime permission. You set Hajiz as the call-screening app, and Android shows its own choice dialog. This needs Android 10 or newer.
- Receive SMS. Used only to check incoming texts for spam. Before Android shows its prompt, the app shows its own message explaining this and asks "Allow SMS access?". You can say "Not now".
- Notifications. Asked for on Android 13 and newer, only for the spam text alerts, after its own explanation first.
- Internet access and network state. For the once-a-day list refresh and the optional feedback message in the app.
Contacts access is not requested, and the app does not read your contacts or your call history.
Honest limits and what was not checked
- No blocker stops every spam call. A new number that matches nothing on your lists and no pattern will ring.
- The list of known spam numbers only helps if one is installed. My records do not show that a list is shipped with the app, so without one the app relies on your own numbers and the patterns above.
- Spam texts are warned about and logged, not removed from your messaging app.
- Call screening needs Android 10 or newer. On older phones the app cannot screen calls.
- What the records show: the pattern check, the text scoring and the number-list code have automated tests, and the live release screens above were captured on a phone. Not on record: a recorded run where a real spam call arrived and was rejected, and any test on a range of phone makes.