aj3423 / SpamBlocker

Android Call/SMS blocker.
MIT License
356 stars 18 forks source link

Rules for incoming calls #117

Closed Nikonok80 closed 2 days ago

Nikonok80 commented 2 weeks ago

Hi there!

I've set up the rules for incoming calls using the Whitelist. Now, I want to configure the settings to receive calls from contacts in my phone book and numbers on the whitelist. All other calls should be automatically rejected.

Could you please advise on the necessary settings for this? photo_5352793152773284876_y

krystofair commented 2 weeks ago

I using it partly in that way, not using whitelist. I've read some code, done some tests, and claim that it should be enough for you to click this button in line of "contact" to display "Exclusive" (in english) should be in red color. Because then rule of contact change priority to 0 (zero) and numbers from whitelist will be checked first. So when whitelist match, contact will skip, or if whitelist not match, contact list will be checked to reject or allow that call.

@aj3423 awesome app!❤️

aj3423 commented 2 weeks ago

@krystofair Thanks for the explanation, it's absolutely correct.

@Nikonok80 An equivalent way is to add a blacklist rule .* with priority 0:

Exclusive Contact == Inclusive Contact + Blacklist rule .* (priority 0)

You can verify that with the "Test" feature.

Nikonok80 commented 2 weeks ago

@aj3423 @krystofair Thanks, I did as you wrote. I still don't quite understand how to work with priorities.

aj3423 commented 2 weeks ago

It will pick the matched rule that has highest priority.

For example, when multiple rules are defined:

  1. Contact Inclusive (priority 10)
  2. Blacklist .* (priority 0)
  3. Whitelist 790030.* (priority 1)

A call from: