如何让所有android的接触,但没有那些有SIM卡 [英] How to get all android contacts but without those which are on SIM
本文介绍了如何让所有android的接触,但没有那些有SIM卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是可能做到在一个查询?
It is possible to do it in one query?
据我了解的内容SIM卡联系人URI是内容:// ICC / ADN
As far as I know content uri of sim contacts is 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);
这篇关于如何让所有android的接触,但没有那些有SIM卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文