How can I get only some particular or selected (multiple) contacts from my contact list and make a group with those selected contacts?
Intent intent1 = new Intent(Intent.ACTION_PICK, Contacts.Phones.CONTENT_URI);
startActivityForResult(intent1, PICK_CONTACT_RQCODE_OLD);
startActivity(intent1);
Here get some part of code for idea
URI contactData = data.getData();
Cursor c = managedQuery(contactData, null, null, null, null);
if (c.moveToFirst())
{
name = c.getString(c.getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));
no = c.getString(c.getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER));
}
here the Complete Example link