aj3423 / SpamBlocker

Android Call/SMS blocker.
MIT License
430 stars 22 forks source link

Dual SIM support #72

Closed 123unix closed 4 months ago

123unix commented 4 months ago

Hello! Would you please consider adding dual SIM support to filter rules?

Possible scenario:

  1. SIM 1 accepts all calls
  2. SIM 2 accepts calls from the Contacts only
aj3423 commented 4 months ago

Technically, it's not possible to access the SIM information within CallScreeningService, which is used by this app. While some apps use CallStateReceiver to block calls, it provides access to the SIM slot number. However, the call must pass the Service to trigger the Receiver, which means the lockscreen will be turned on, preventing silent call rejection or silencing(ringing at background).

The approach would significantly increase complexity (code, UI, user experience), and offers more Cons than Pros. Therefore, I prefer not support it for now.

I've submited a feature request to google (link). Once supported, the regex rule will be able to differenciate the SIM cards.

NOTE: Currently it does support dual SIM cards, it wil work for both SIM cards, it's just unable to differentiate between them.