title: How to build an app that shows my contacts phone number
body: <p>I've recently built an app that shows my contacts names , but the problem is that I want to show their phone number rather their names. the following is my code that finely shows the contacts names</p>
  
  <pre><code>   public class Main extends ActionBarActivity implements View.OnClickListener {
  TextView tv ;
  Button Action ;
  String name ;
   @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
       tv = (TextView) findViewById(R.id.textView) ;
       Action = (Button) findViewById(R.id.button) ;
       Action.setOnClickListener(this );
   }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      switch (requestCode) {
          case (0) :
              if (resultCode == Activity.RESULT_OK) {
                  Uri contactData = data.getData();
                  Cursor c =  getContentResolver().query(contactData,
                          null,null
                          ,null, null);
                  if (c.moveToFirst()) {
                      name = "" ;
                      name = c.getString(c.getColumnIndex(ContactsContract
                              .Contacts.DISPLAY_NAME));
                      // TODO Whatever you want to do with the selected contact name.
                      tv.setText("");
                      tv.setText(name);
                  }
              }
              break;
      }
  
  }
  </code></pre>