my purpose to retrieve the list of contacts (name, number) is recorded in a json object, to send via web service to the server
then I found the code to visit contact
You can use the below query to retrieve the favourite contacts from Contacts DB
Cursor cursor = this.managedQuery(ContactsContract.Contacts.CONTENT_URI, projection, "starred=?",new String[] {"1"}, null);