What is important :
abortBroadcast();
filter.setPriority(1000);
It works (I use in my app GPSDetective - you can dl on the android market)
Sample code :
BroadcastReceiver br;
@Override
public void onCreate()
{
super.onCreate();
{
@Override
public void onReceive(Context ctx, Intent intent)
{
Bundle extras = intent.getExtras();
SmsMessage[] sms = null;
if (extras != null)
{
//read the content of the SMS and do what you want
if (bKeepThisSMSforMyApp=true)
abortBroadcast();
}
}
};
IntentFilter filter = new IntentFilter();
filter.addAction("android.provider.Telephony.SMS_RECEIVED");
filter.setPriority(1000);
registerReceiver(br, new IntentFilter(filter));
}