ContentResolver update issues

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

ContentResolver update issues

Postby kingkung » Wed Jul 09, 2008 5:45 pm

Anyone else have problem with update() in ContentResolver?

I have some extremely simple code--I just want to update the PHOTO
column of the People content provider.

private void updatePhoto(int id, String uri)
{
ContentValues cv = new ContentValues();
cv.put(People.PHOTO, uri);
int x = getContentResolver().update(People.CONTENT_URI,cv,People._ID
+"="+id, null);
Log.d("PhotoUpdater",x+" row(s) updated.");
}

public void onCreate(Bundle icicle) {
super.onCreate(icicle);
updatePhoto(14,"http://www.homepage.com/brandon.jpg");
}

I am 100% confident I have a contact with ID 14, so why is my row not
updated?? Bug??

James
kingkung
Freshman
Freshman
 
Posts: 9
Joined: Wed Apr 16, 2008 6:24 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 5 guests