This is what I was trying to do:

.
.
private static final int PEOPLE__ID_COLUMN_INDEX = 0;
private static final int PEOPLE_NAME_COLUMN_INDEX = 1;
.
.
.
String[] projectionPeople = new String[] { People._ID, People.NAME };
Cursor peopleCur = getContentResolver().query(People.CONTENT_URI,
projectionPeople, null, null, People.NAME);

Uri.Builder builder = People.CONTENT_URI.buildUpon();

if (null != peopleCur)
{
  if (peopleCur.moveToFirst())
  {
    String id = peopleCur.getString(PEOPLE__ID_COLUMN_INDEX);

    ContentValues contentValues = new ContentValues();
    contentValues.put( People.Phones.NUMBER, "1234567890");
    builder.encodedPath(People.Phones.CONTENT_DIRECTORY + "/" + id);
    getContentResolver().update( builder.build(), contentValues, null,
null );
  }
}

-- 
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