Try to declare your receiver in this way :
<receiver android:name=".MySmsReceiver">
<intent-filter android:priority="999">
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
Instead of :
<receiver android:name=".MySmsReceiver" >
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED"
android:priority="999"
/>
</intent-filter>
</receiver>
Also try to check the following condition before aborting your broadcast :
EDITED :
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(SMS_RECEIVED)) {
Bundle extras = intent.getExtras();
if(extras != null)
// doBroadcast();
else
abortBroadcast();
}
}
Hope it helps you.
Thanks.