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
是否適用於帳戶類型?或者我可以在哪裏找到電報的帳戶類型?
感謝您的關注。