Hi Sam,
You are talking about batch update? But I don't see the point why you
need to update all phones belong to person in one shot with the same
values?
I would return from method getPerson(long personId) domain object
Person with reference to the List of Phones objects or List of
PhoneIds and
Hi ildus,
Thanks for the sample! I was able to get update to work and figure out
where we differ.
I was using the personID to do multiple deletes or updates. The logic
was similar to query where we use the Person id to query the phone
database for multiple phone records that are associated with
Sam,
I think the problem is how you created the contact entry. Try this
method to create contact
replace CallCardProvider object with yours actual parameters. Then try
delete or update this entry using methods above.
Hope it helps.
Ildus
//Create Contact //
public long createContact
Hi ildus,
Thanks for the response!
I tried your solutions and the update still does not take place. I get
row = 0 for both delete and update , meaning no rows were updated.
If I can just get one of them to work - either delete or update, it
would be sufficient to me.
So your able to delete exist
I see only the difference from my code (which is working)
DELETE
is that instead of putting Phones.CONTENT_URI put
Contacts.Phones.CONTENT_URI
UPDATE
provide to the update method phoneId, get uri and call update:
phoneUri = ContentUris.withAppendedId(Contacts.Phones.CONTENT_URI,
phoneId);
row = g
5 matches
Mail list logo