I believe the uri you are using is created by appending the compnay id
to the contact uri.
Instead try this,
uri = ContentUris.withAppendedId(Contacts.Organizations.CONTENT_URI,
id));
where id the company id.



On Mar 12, 8:59 pm, timo prill <[email protected]> wrote:
> hello,
>
> i am trying to update an addressbook contact's company & title field in
> Android SDK 1.6.
>
> i am trying to update the company field like this:
>
> [...]
> values.put(Contacts.Organizations.COMPANY, organisation);
>             values.put(Contacts.Organizations.TYPE,
>                     Contacts.Organizations.TYPE_WORK);
>
> cr.update(Uri.withAppendedPath(uri,String.valueOf(idCompany)), values,
> null,null);
>
> [...]
>
> when executing my code i get the following error:
>
> java.lang.UnsupportedOperationException: Cannot update URL:
> content://contacts/people/13/organizations/6
>
> the way i am trying to update the company field works for all other
> fields (address fields, phone numbers, email addresses etc..). the only
> field where this method does not work is on the company and the title field.
>
> any ideas? is it a known issue in android 1.6? if yes, is there a
> workaround?
> even trying to delete the entry and insert a new one instead doesnt
> work. this leads to the same exception when trying to delete the value.
>
> cheers
> timo

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to