How to import contacts from phonebook to our application

前端 未结 4 1508
长发绾君心
长发绾君心 2020-11-29 13:37

I am developing the android application ,when ever user clicks on the button it should show all contacts from the phone book with in a table.How can i achieve it,any one can

4条回答
  •  一生所求
    2020-11-29 14:13

    You can use this code inside the button.setonclicklistener.

    Intent intent = new Intent(Intent.ACTION_PICK,ContactsContract.Contacts.CONTENT_URI); startActivityForResult(intent, PICK_CONTACT);

提交回复
热议问题