title: How can I read the favorites contacts inside service?
body: <p>I am looking for a way to get the  contacts in the favorites list inside service from phone number or from name it dose not matter. Can any one help me with this?</p>
  
  <p>It's not important to use any code related to this code</p>
  
  <p>I found in the developer.android.com something like this (IN_VISIBLE_GROUP).
  How to use this variable in my case?</p>
  
  <pre><code>   case (PICK_CONTACT):
                if (resultCode == Activity.RESULT_OK) {
                        Uri contactData = data.getData();
                        Cursor c = managedQuery(contactData, null, null, null, null);
                        ContentResolver cr = getContentResolver();
                        if (c.moveToFirst()) {
                                String name = c.getString(c.getColumnIndexOrThrow(People.NAME));
                                String id =c.getString(c.getColumnIndexOrThrow(People._ID));
                                Cursor phones = cr.query(Phone.CONTENT_URI, null,
                                        Phone.CONTACT_ID + " = " + id, null, null);
  }
  </code></pre>