There is an application that should intercept sms and check if the sms came from one of the service numbers, then process this sms by our application (sms should not get into the list of incoming messages on the device and the new sms notification should not pop up; data from SMS and process them - no problem with that), if not from the service number - then send the standard SMS application on the device for processing (Messsages, Hangouts, etc.).
To accomplish this task, it is necessary that our application be the first to intercept incoming SMS, and for this, apparently, it should stand as the default application for SMS (correct if correct).
But, if our application will be the default for SMS, then let's say if our Receiver intercepted the incoming message, but determined that it came not from the service number, this message will be processed in a standard SMS application (Messsages, Hangouts, and .d.) with standard behavior (pop-up notification of a new SMS, etc.)?
Bottom line: our application needs to be able to intercept and process incoming messages only from certain phone numbers, and from all other numbers, so that sms are processed by applications that are designed specifically for these tasks (Messsages, Hangouts, etc.).
This functionality should work with the version of android 2.3 ending with the latest.