I hace the same problem, and I couldn't figure it out. I home some one will have a solution for this.
On Sep 18, 1:52 am, herakl337us <[EMAIL PROTECTED]> wrote: > Hi y'all: > > Has anyone had any success updating thephonenumberon acontact? > > I can't seem to get the Uri right. > > Here's the google documentation: (yes, this is ALL of it) > Modifying Data > To batchupdatea group of records (for example, to change "NY" to > "New York" in allcontactfields), call the ContentResolver.update() > method with the columns and values to change. > > So that led me to something that looked like this: > > Uri phoneUri = Uri.withAppendedPath(mContact, > People.Phones.CONTENT_DIRECTORY); > > //updatePhoneentry forcontact > values.clear(); > values.put(People.Phones.TYPE, Contacts.Phones.TYPE_MOBILE); > values.put(People.Phones.NUMBER,number); > > //callupdateto apply data to uri > getContentResolver().update(phoneUri, values, null, null); > > but this code always gives me an exception, saying i cannotupdatethe > following url: > content://contacts/people/x/phones > where x is the id of thecontact > > i've also tried that URL with a WHERE clause, but i still get the > "cannot modify url" message. > > So what URL do I modify toupdateaphonenumber? > Thanks! > > Cheers, > Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---