Java Block Inbox SMS in kitkat 4.4

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?

+4
source share
1 answer

, kitkat , msg

API 19 . ~ 60% Android, Play Store.

, ACTION_CHANGE_DEFAULT Intent. SMS Android SDK, .

sms kitkat ?

SMS- SMS.

+2

Source: https://habr.com/ru/post/1610097/


All Articles