title: (EditText)Android Contact list getting phone number
body: <p>I'm new to Android development. I have used ;
  </p>
  
  <p>I type the number in the EditText, Now i want to get the contact number from my contact list. can someone pls help me to fix this?</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      final EditText pnumber= (EditText) findViewById(R.id.editTextPnumber);
      final EditText gsms= (EditText) findViewById(R.id.editTextSMS);
      Button sendsms= (Button) findViewById(R.id.buttonSend);
  
      sendsms.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
  
              String gPhone= pnumber.getText().toString();
              String gSMS= gsms.getText().toString();
  
  
              try {
                  SmsManager smsManager = SmsManager.getDefault();
                  smsManager.sendTextMessage(gPhone, null, gSMS, null, null);
  
                  Toast.makeText(getApplicationContext(), "SMS Sent ! ", Toast.LENGTH_LONG).show();
                  finish();
  
              } catch (Exception e) {
                  // TODO: handle exception
  
                  Toast.makeText(getApplicationContext(), "PLS Enter Again ! ", Toast.LENGTH_LONG).show();
                  e.printStackTrace();
              }
  
          }
      });
  </code></pre>