java - Android一次性选取5个联系人的思路是什么?
PHP中文网
PHP中文网 2017-04-17 17:41:12
0
1
279

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

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
迷茫

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template