Android contacts are stored within Accounts (such as Google, Yahoo, Linkedin, Microsoft Exchange) in each account, contacts are stored in Groups (for example, friends, family, business contacts), as well as a special group for contacts that do not belong to either which group, this group is usually called " All others in <group-name> ").
In most contacts of applications delivered with Android, the user can select the Custom view, in which he can make groups in accounts visible or hidden on the main contacts screen, for example, the user can choose to display Friends group, but not Family group in his Google Contacts account .
This selection will refer to the application requesting contacts using the IN_VISIBLE_GROUP field, this will be true if the contact is part of the visible group of at least one . The All others in special group is almost always not a visible group, so it is usually hidden from the Contacts application.
In particular, at Google, when you send a message to someone or receive an email from someone, the email address is automatically added to your contacts, to the All others in group, so you probably get a huge number of contacts when you request without this flag.
source share