现在的位置: 首页 > 综合 > 正文

AggregationSuggestions

2013年10月05日 ⁄ 综合 ⁄ 共 982字 ⁄ 字号 评论关闭

AggregationSuggestions

java.lang.Object

        android.provider.ContactsContract.Contacts.AggregationSuggestions

Class Overview
A read-only sub-directory of a single contact aggregate that contains all aggregation suggestions (other contacts).

The aggregation suggestions are computed based on approximate data matches with this contact.

Note: this query may be expensive! If you need to use it in bulk,

 make sure the user experience is acceptable when the query runs for a long time. 


 它能查询建议和contactId合成一组的Contacts集合。

 注意1:查询结果不包括其本身。

 注意2:该查询很耗时。

 注意3:这里查询返回的结果也是17列,和Contact一样。具体可以参照《Contact类

 例1:    
    Uri uri = Contacts.CONTENT_URI.buildUpon()
     .appendEncodedPath(String.valueOf(contactId))
     .appendPath(Contacts.AggregationSuggestions.CONTENT_DIRECTORY)
     .appendQueryParameter("limit", "3")//这里限定了返回的最大项数
     .build();
     Cursor c = context.getContentResolver().query(uri,
     new String[] {Contacts.DISPLAY_NAME, Contacts._ID, Contacts.LOOKUP_KEY},
     null, null, null);

抱歉!评论已关闭.