0
我试图让所有的电报联系,在我的应用程序中使用的所有电报接触,这里是我的代码:得到保存在手机
Cursor c = getContentResolver().query(
ContactsContract.RawContacts.CONTENT_URI,
new String[] { ContactsContract.RawContacts.CONTACT_ID, ContactsContract.RawContacts.DISPLAY_NAME_PRIMARY },
ContactsContract.RawContacts.ACCOUNT_TYPE + "= ?",
new String[] { "org.telegram.messenger.account" },
null);
ArrayList<String> myTelegramappContacts = new ArrayList<String>();
int contactNameColumn = c.getColumnIndex(ContactsContract.RawContacts.DISPLAY_NAME_PRIMARY);
while (c.moveToNext())
{
// You can also read RawContacts.CONTACT_ID to read the
// ContactsContract.Contacts table or any of the other related ones.
myTelegramappContacts.add(c.getString(contactNameColumn));
}
,但它不返回我任何接触!
我的问题是什么?
是org.telegram.messenger.account
是否适用于帐户类型?或者我可以在哪里找到电报的帐户类型?
感谢您的关注。