All contacts (if synchronized) can be requested using ContactsContract . The RawContacts.ACCOUNT_TYPE column of the RawContacts.ACCOUNT_TYPE table indicates the type of account for each record ("raw" means that it contains all the records, for example, several rows for one person with several aggregated contacts).
To read Skype contacts, you can do something like this:
Cursor c = getContentResolver().query( RawContacts.CONTENT_URI, new String[] { RawContacts.CONTACT_ID, RawContacts.DISPLAY_NAME_PRIMARY }, RawContacts.ACCOUNT_TYPE + "= ?", new String[] { "com.skype.contacts.sync" }, null); int contactNameColumn = c.getColumnIndex(RawContacts.DISPLAY_NAME_PRIMARY); ArrayList<String> mySkypeContacts = new ArrayList<String>(); while (c.moveToNext()) {
Be sure to request permission android.permission.READ_CONTACTS in the AndroidManifest.xml file.
source share