READ_CONTACTS
आपके मैनिफेस्ट में अनुमति के साथ, आप खाता प्रकार दिए गए समन्वयित संपर्क प्राप्त कर सकते हैं। व्हाट्सएप के लिए यह "com.whatsapp"
है। तो:
Cursor c = getContentResolver().query(
RawContacts.CONTENT_URI,
new String[] { RawContacts.CONTACT_ID, RawContacts.DISPLAY_NAME_PRIMARY },
RawContacts.ACCOUNT_TYPE + "= ?",
new String[] { "com.whatsapp" },
null);
ArrayList<String> myWhatsappContacts = new ArrayList<String>();
int contactNameColumn = c.getColumnIndex(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.
myWhatsappContacts.add(c.getString(contactNameColumn));
}
प्रारंभ यहाँ: http://developer.android.com/samples/BasicContactables/index.html – ditkin
हाय कैसे 1234567890 तरह पूर्व मोबाइल नंबर खोजने के लिए और उसके तो कैसे अपने इस्तेमाल किया खोजने के लिए एप्लिकेशन क्या में इस्तेमाल किया मेरे आवेदन संपर्क सूची में व्हाट्सएप में? –
क्या प्रयास किया है? क्या आप उस कोड के साथ समस्याएं हैं जो आप काम करने की कोशिश कर रहे हैं? – ditkin