title: Deleting SMS Using BroadCastReceiver - Android
body: <p>i have broadcast receiver class for receiving sms, but i dont know how to delete the received sms <strong>before reaching to the inbox</strong> as well as the notification</p>
  
  <pre><code>public void onReceive(Context context, Intent intent) {     
          Bundle pudsBundle = intent.getExtras();     
          Object[] pdus = (Object[]) pudsBundle.get("pdus");
          SmsMessage messages =SmsMessage.createFromPdu((byte[]) pdus[0]);        
          Log.i(TAG,  messages.getMessageBody());
  }
  </code></pre>