13

可以在一个查询中完成吗?

据我所知,sim 联系人的内容 uri 是content://icc/adn

4

1 回答 1

21

这很容易!:)

Cursor cursor = mContentResolver.query(
   RawContacts.CONTENT_URI,
   new String[]{RawContacts._ID,RawContacts.ACCOUNT_TYPE},
   RawContacts.ACCOUNT_TYPE + " <> 'com.anddroid.contacts.sim' "
    + " AND " + RawContacts.ACCOUNT_TYPE + " <> 'com.google' " //if you don't want to google contacts also
   ,
   null,
   null);
于 2010-12-10T13:53:54.710 回答