ContentValues values = new ContentValues();
values.put(People.NAME, "Serkan Ozel");
Uri uri = getContentResolver().insert(People.CONTENT_URI, values);
Bitmap photo = myImage.getBitmap();
if (photo != null) {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
photo.compress(Bitmap.CompressFormat.JPEG, 75, stream);
People.setPhotoData(getContentResolver(), uri, stream.toByteArray
());
}