Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Allow the user to select a contact using this..</p> <pre><code>&lt;uses-permission android:name="android.permission.READ_CONTACTS"/&gt; </code></pre> <p><strong>2) Calling the Contact Picker</strong></p> <p>Within your Activity, create an Intent that asks the system to find an Activity that can perform a PICK action from the items in the Contacts URI.</p> <pre><code>Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI); </code></pre> <p>Call startActivityForResult, passing in this Intent (and a request code integer, PICK_CONTACT in this example). This will cause Android to launch an Activity that's registered to support ACTION_PICK on the People.CONTENT_URI, then return to this Activity when the selection is made (or canceled).</p> <pre><code> startActivityForResult(intent, PICK_CONTACT); @Override public void onActivityResult(int reqCode, int resultCode, Intent data) { super.onActivityResult(reqCode, resultCode, data); switch (reqCode) { case (PICK_CONTACT) : if (resultCode == Activity.RESULT_OK) { Uri contactData = data.getData(); Cursor c = managedQuery(contactData, null, null, null, null); if (c.moveToFirst()) { String name = c.getString(c.getColumnIndexOrThrow(People.NAME)); } } break; } } </code></pre> <p>Now once a contact is selected you will have the information you need to fill in your edittexts and all above.</p> <p>This is en excellent tutorial on how to do this. Good Luck! This should get you well on your way! <a href="http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/" rel="nofollow">Working with Androind contacts</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload