Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Combine two existing contact by AggregationExceptions
- ArrayList<ContentProviderOperation> ops0 = new ArrayList<ContentProviderOperation>();
- ops0.add(ContentProviderOperation.newUpdate(ContactsContract.AggregationExceptions.CONTENT_URI)
- .withValue(ContactsContract.AggregationExceptions.RAW_CONTACT_ID1,ID_main)
- .withValue(ContactsContract.AggregationExceptions.RAW_CONTACT_ID2,ID_other)
- .withValue(ContactsContract.AggregationExceptions.TYPE,ContactsContract.AggregationExceptions.TYPE_KEEP_TOGETHER).build());
- try {
- getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops0);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- .withValue(ContactsContract.AggregationExceptions.RAW_CONTACT_ID1,ID_main)
- .withValue(ContactsContract.AggregationExceptions.RAW_CONTACT_ID2,ID_other)
- .withValue(ContactsContract.AggregationExceptions.RAW_CONTACT_ID1,ID_other)
- .withValue(ContactsContract.AggregationExceptions.RAW_CONTACT_ID2,ID_main)
Add Comment
Please, Sign In to add comment