I am developing an Android application that blocks incoming sms from certain numbers, which I have successfully achieved this. The application works fine in versions other than version 4.4.4. I set my betrayal, but nothing worked for me. here is the code for the receiver in the manifest
<receiver android:name=".msgreceiver"><intent-filter android:priority="1000"><action android:name="android.provider.Telephony.SMS_RECEIVED"/></intent-filter></receiver>
and I block sms by calling this method in java
this.abortBroadcast();
I am trying to solve this problem and found that in kitkat the application needs to be installed as the default messaging application in order to abort msg. But I want to do this programmatically. Is there a way to block incoming sms in kitkat programmatically?
source
share