title: How to block a mobile number call and message receiving in android application development?
body: <p>I would like to implement an application for block a mobile number for receiving or sending calls and messages. In my application I am entering mobile number at <code>EditText</code> box then I am clicking a button for block the mobile number which has entered by the user.</p>
  
  <p>I have implemented an activity class as follows:</p>
  
  <pre><code>public class BlockNumberActivity extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          ((Button)findViewById(R.id.block)).setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
                  String mobileNumer = ((EditText)findViewById(R.id.mobileNum)).getText().toString();
                  //How to block entered mobileNumber
              }
          });
  
          ((Button)findViewById(R.id.unblock)).setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
                  String mobileNumer = ((EditText)findViewById(R.id.mobileNum)).getText().toString();
                  //How to unblock entered mobileNumber
              }
          });
      }
  }
  </code></pre>
  
  <p>I think we may use <code>BroadcastReceiver</code>. But I don't have more knowledge on it. Please give me an idea how to implement blocking or unblocking mobile number.
  Please any body help me.....</p>