0

Is it possible to have an SMS app that can block some kind of SMS (i.e. where text contains "XYZ" phrases), but I don't want it to be set as the default SMS app?

I've seen something like SMS Radar but don't know if that can do the task.

1 Answer 1

1

This isn't possible as of Android KitKat (4.4). Only the default SMS app is able to stop the broadcast of the SMS message to the other apps.

That said, since Android N, you should be able to use blocking to block SMS and Calls from a particular telephone number using Android N Call Blocking.

https://www.digitaltrends.com/mobile/how-to-block-a-number-in-android/

Note that some Carriers/OEMs may actually disable this blocking feature or make it harder to get to.

There is a Content Provider and API starting in Android N that would allow apps to programmatically block calls and texts, you need to either be the default SMS or phone app, a system app, or a carrier app. While becoming a default app is something the user would allow you to do, only carrier-approved apps could become carrier apps.

https://developer.android.com/reference/android/provider/BlockedNumberContract.html#AUTHORITY_URI

2
  • 1
    thanks. btw, i am not interested at all in the blocking sms or calls from number. I wanted programaticall way to block sms containing the specific string.
    – T.Todua
    Mar 31, 2018 at 15:35
  • Updated with Android N Blocking API info. To block am SMS with a specific string content you'd have to be the default app. Because you would need to check the contents and make a decision as to wether or not to allow the SMS to propagate through the system.
    – DataDino
    Mar 31, 2018 at 16:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .