Reputation: 1800
I'm trying to update a contact using the 'new' api. i've got the raw contact ID of the contact and the contact is linked to an account, but i cant find anywhere some sample code or working code that i can study and adapt.
Dunno wherever i have to 'query' the contact first for any info? And is the raw contact ID enough to 'update' a Contact?
At the moment I'm using the ContentProviderOperation.newUpdate(Data.CONTENT_URI)
Is this the best way? and if so what else do i need to add to add details to the contact?
Also i have read somewhere that you have to use something along the lines of .withSelection(Data.CONTACT_ID = 123... etc
but I'm not too sure..
Any help would be brilliant and Thanks in advance!
Upvotes: 1
Views: 963
Reputation: 7585
Take a look at this SO question. It shows how to update the work number using the new API. Sems to do what you want.
How to update contact number using Android
Upvotes: 2