コード例 #1
0
 // L�gg till en ny kontakt
 public void addPicture(ContentResolver contentResolver, PictureModel pic) {
   ContentValues values = new ContentValues();
   values.put(Pictures.PICTURE, pic.getPicture());
   contentResolver.insert(Pictures.CONTENT_URI, values);
 }
コード例 #2
0
 public void updateContact(ContentResolver contentResolver, PictureModel pic) {
   ContentValues values = new ContentValues();
   values.put(Pictures.PICTURE, pic.getPicture());
   int updated = contentResolver.update(Pictures.CONTENT_URI, values, null, null);
   Log.d("DB", "Uppdaterade " + updated + " pictures.");
 }