Q:

Android: How can I get DISPLAY_NAME & COMPANY name of all contact the same time by using cursorloader?

I want to get DISPLAY_NAME & COMAPNY name of all contacts the same time by using cursorloader. And I have already get DISPLAY NAME of them.
My problem is that I do not know how to get COMPANY name the same time with DISPLAY_NAME!
Could you show me the way to solve my question. Here is my code.
public class MainActivity extends ListActivity implements LoaderManager.LoaderCallbacks<Cursor>{
SimpleCursorAdapter mAdapter;       
LoaderManager loadermanager;    

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    loadermanager = getLoaderManager();     
    String[] fromColumns = {ContactsContract.Contacts._ID,
                            ContactsContract.Contacts.DISPLAY_NAME};        

    int[] toViews = {R.id.contactId,
                     R.id.contactName};

    mAdapter = new SimpleCursorAdapter(this,  
            R.layout.view_contact_entry, null,
            fromColumns, toViews, 0);

    setListAdapter(mAdapter);
    loadermanager.initLoader(1, null, this);
}

public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    String[] projection = new String[] {ContactsContract.CommonDataKinds.Phone._ID,
            ContactsContract.Contacts.DISPLAY_NAME};        
    String selection = ContactsContract.Contacts.IN_VISIBLE_GROUP + " = '1'";

    String sortOrder = ContactsContract.Contacts.DISPLAY_NAME + " COLLATE LOCALIZED ASC";               
    return new CursorLoader(this, ContactsContract.Contacts.CONTENT_URI,
            projection, selection, null, sortOrder); 
}

public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
    if(mAdapter!=null && cursor!=null)
        mAdapter.swapCursor(cursor);
    else
        Log.v("MAIN","OnLoadFinished: mAdapter is null");
}

public void onLoaderReset(Loader<Cursor> loader) {
    mAdapter.swapCursor(null);
}
@Override 
public void onListItemClick(ListView l, View v, int position, long id) {
    try {
        Cursor cs = (Cursor)l.getItemAtPosition(position);
        Intent  objIndent = new Intent(getApplicationContext(),DetailContact.class);
        objIndent.putExtra("contactId", cs.getString(0)); 
        objIndent.putExtra("contactName", cs.getString(1)); 
        startActivity(objIndent);   
    } catch (Exception e) {
        Log.e("ERROR: ", e.getMessage());
    }
}

}

A:

I think you need to look at querying against the ContactsContract.Data
There is an example of joining and pulling in additional data from the contact in the docs
along with this special constant ContactsContract.CommonDataKinds.Organization.COMPANY

