ICImageAttachment

Represents an image attachment.

fromJSON

Instantiates an ICImageAttachment from a JSONObject. The JSONObject must contain valid image attachment data.

  Syntax: static ICImageAttachment fromJSON(JSONObject jsonObj)

  Return Value: A new ICImageAttachment instance, or null if jsonObj is null.

  Parameters:

ParameterTypeDescription
jsonObjJSONObjectA JSONObject containing valid image attachment data.

getPreviewImage

Gets the attachment preview image as a bitmap.

  Syntax: Bitmap getPreviewImage()

  Return Value: A bitmap containing the preview image, or null if there is no preview.

setPreviewImage

Sets the attachment preview image.

  Syntax: void setPreviewImage(Bitmap preview)

  Parameters:

ParameterTypeDescription
previewBitmapA Bitmap object containing the preview image.