可以在一个查询中进行操作吗?

据我所知,Sim Contacts的内容是 content://icc/adn

有帮助吗?

解决方案

这很容易! :)

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);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top