ICAttachment

The base class for message attachments exposes elements common to all types of attachments.
Attachments can be present on both incoming and outgoing messages.

Public Methods:

getContentType


Gets the content type of the attachment, such as image/video/location.

  Syntax: String getContentType()

  Return Value: Returns the content type.

setContentType


Set the content type of the attachment.

  Syntax: void setContentType(String contentType)

  Parameters:

Parameter

Type

Description

contentType

String

The content type.

toJSON

Returns a new JSONObject instance containing attachment data.

  Syntax: JSONObject toJSON()

  Return Value: A JSONObject representation of the attachment.