android.provider.ContactsContract.CommonDataKinds.Photo Java Examples
The following examples show how to use
android.provider.ContactsContract.CommonDataKinds.Photo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ContactOperations.java From tindroid with Apache License 2.0 | 5 votes |
/** * Add avatar to profile * * @param avatar avatar image serialized into byte array * @return instance of ContactOperations */ ContactOperations addAvatar(final byte[] avatar) { mValues.clear(); if (avatar != null) { mValues.put(Photo.PHOTO, avatar); mValues.put(Photo.MIMETYPE, Photo.CONTENT_ITEM_TYPE); addInsertOp(); } return this; }
Example #2
Source File: ContactOperations.java From tindroid with Apache License 2.0 | 5 votes |
ContactOperations updateAvatar(byte[] avatarBuffer, Uri uri) { mValues.clear(); if (avatarBuffer != null) { mValues.put(Photo.PHOTO, avatarBuffer); mValues.put(Photo.MIMETYPE, Photo.CONTENT_ITEM_TYPE); addUpdateOp(uri); } return this; }