I am trying to not to propagate an sms upon receiving like this
public class SMSReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
abortBroadcast();
setResultData(null);
}
}
AndroidManifest.xml
<receiver android:name=".SMSReceiver" android:enabled="true" android:priority = "100" >
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
but this is not working. I have been looking for a fix for days now. any help is highly appreciated.
Thanks
You need to set the
android:priorityattribute on the<intent-filter>, not the<receiver>.e.g
http://developer.android.com/guide/topics/manifest/intent-filter-element.html