How to make a single query to check if a contact has a phone number and is present in some group say "abc"?

I want to make a query to check if a contact has any kind of phone number and is present in a particular group or not?


I am not sure about Group but about containing minimum 1 phone number you can prepare a query like this

Uri URI = ContactsContract.Contacts.CONTENT_URI;
String[] projection = {ContactsContract.Contacts._ID, ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts.HAS_PHONE_NUMBER};
String selection = ContactsContract.Contacts.HAS_PHONE_NUMBER + "=1";

Cursor mContactCursor = .getContentResolver().query(URI, projection, selection, null, null);

Remember to add permission in your manifest.

<uses-permission android:name="android.permission.READ_CONTACTS" />

Need Your Help

eclipse:default package always visible


Today I suddenly find the default package always visible in my all project.

Why are my shapes not added to the stage?

html easeljs createjs

I am drawing a line using CreateJS. As long as it is the "CreateJS 2013.09.25" reference. The line is drawn like expected.