In Android, how to pick a contact and display it on my app?

前端 未结 6 1730
暖寄归人
暖寄归人 2020-12-21 09:28

I am a beginner to android, i am building a application in which when the user presses a button, the contacts which is stored in the mobile are shown. When he selects a cont

6条回答
  •  天涯浪人
    2020-12-21 09:48

    Intent intent1 = new Intent(Intent.ACTION_PICK, Contacts.Phones.CONTENT_URI);
                startActivityForResult(intent1, PICK_CONTACT_RQCODE_OLD);
                startActivity(intent1);
    

    This works in my implementation.

提交回复
热议问题