gyus.
I'm trying to add a connection to an existing contact, like viber does:
It was pretty simple to add a contact with such connection following nemezis repo, but I haven't managed to update a contact in order to add a connection. I have tried:
ops.add(ContentProviderOperation.newUpdate(addCallerIsSyncAdapterParameter(Data.CONTENT_URI, true))
.withSelection(Data.RAW_CONTACT_ID + "= ?", new String[]{String.valueOf(id)})
//.withValue(Data.RAW_CONTACT_ID, id)
.withValue(Data.MIMETYPE, MIMETYPE_PROFILE)
//.withValue(Data.DATA1, 12345)
.withValue(Data.DATA2, "sample")
.withValue(Data.DATA3, "sample")
.build());
But it just doesn't work without errors. I tried a bunch of other options, but failed with them too, I doubt I should post all of them here. Any ideas, guys?
Thanks a lot.