While contacts for applications are synchronized, you can request RawContacts (with READ_CONTACTS permission in the manifest) and get them filtered by account type. For instance:
Cursor c = getContentResolver().query( RawContacts.CONTENT_URI, new String[] { RawContacts.CONTACT_ID, RawContacts.DISPLAY_NAME_PRIMARY }, RawContacts.ACCOUNT_TYPE + "= ?", new String[] { <account type here> }, null); ArrayList<String> myContacts = new ArrayList<String>(); int contactNameColumn = c.getColumnIndex(RawContacts.DISPLAY_NAME_PRIMARY); while (c.moveToNext()) {
It is a matter of providing the appropriate type of account. For instance:
"com.google" for Gmail,"com.whatsapp" for WhatsApp,"com.skype.contacts.sync" for Skype,- &. WITH
source share