private void uploadContacts(Context context,ContentProviderClient cp) throws RemoteException {
  String[] proj={_ID,Contacts.GLOBAL_ID,Contacts.EMAIL_HASH,Contacts.FOLLOWING,Contacts.STATUS_ID,Contacts.DIRTY,Contacts.VERSION};
  String sel=Contacts.DIRTY + " = 1";
  List<User> users=Contacts.from(cp.query(CONTACTS_URI,proj,sel,null,null));
  if (users != null) {
    LocalBroadcastManager bm=LocalBroadcastManager.getInstance(context);
    bm.sendBroadcast(new Intent(ACTION_CONTACTS_SYNCING));
    response(Server.syncContacts(users),cp,CONTACTS_URI);
    bm.sendBroadcast(new Intent(ACTION_CONTACTS_SYNCED));
  }
}

private void uploadContacts ( Context context , ContentProviderClient cp ) throws RemoteException { String [ ] proj = { _ID , Contacts . GLOBAL_ID , Contacts . EMAIL_HASH , Contacts . FOLLOWING , Contacts . STATUS_ID , Contacts . DIRTY , Contacts . VERSION } ; String sel = Contacts . DIRTY + " = 1" ; List < User > users = Contacts . from ( cp . query ( CONTACTS_URI , proj , sel , null , null ) ) ; if ( users != null ) { LocalBroadcastManager bm = LocalBroadcastManager . getInstance ( context ) ; bm . sendBroadcast ( new Intent ( ACTION_CONTACTS_SYNCING ) ) ; response ( Server . syncContacts ( users ) , cp , CONTACTS_URI ) ; bm . sendBroadcast ( new Intent ( ACTION_CONTACTS_SYNCED ) ) ; } }
upload contact changes to the server .
