Code example for ContentValues

Methods: updateput

0
     
    public static Uri putBitmapIntoGalleryAndGetUri(Context c, Bitmap image, boolean recycleOriginal) {
        if (image != null) {
            Uri dataUri = Uri.parse(MediaStore.Images.Media.insertImage(c.getContentResolver(), image, null, null));
            if (dataUri != null) {
            	ContentValues cv = new ContentValues();
            	cv.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis());
            	cv.put(MediaStore.Images.Media.DATE_ADDED, System.currentTimeMillis());
            	c.getContentResolver().update(dataUri, cv, null, null);
            } 
            if (recycleOriginal)
                image.recycle();
            return dataUri; 
        } 
        return null; 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java