[android-developers] Re: Unable to Update a Contact Phone number

2009-02-27 Thread rex
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

[android-developers] Re: Unable to Update a Contact Phone number

2009-02-25 Thread Sam
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

[android-developers] Re: Unable to Update a Contact Phone number

2009-02-24 Thread rex
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

[android-developers] Re: Unable to Update a Contact Phone number

2009-02-24 Thread Sam
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

[android-developers] Re: Unable to Update a Contact Phone number

2009-02-24 Thread rex
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