search

Home  >  Q&A  >  body text

java - Android一次性选取5个联系人的思路是什么?

想在手机通讯录一次性选取5个联系人,然后返回给onActivityResult(),这个实现思路应该是什么样的呀?

PHP中文网PHP中文网2811 days ago281

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-17 17:43:12

    The question is what do you want to do? Is it limited to fetching only 5 contacts at a time or does it only require the data of 5 contacts?

    • It is limited to only obtain 5 items at a time, so add limit when querying the contact table

    • You only need the data of 5 contacts. In addition to the above point, you can query all the contact data and cut out 5 people

    Getting address book contacts does not require opening any activity, so the data will not be called back to the onActivityResult() method. Querying the address book only requires the ContentResolver to submit the query, return the Cursor and then parse it.

    reply
    0
  • Cancelreply