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:
Return Type | Method |
---|---|
String | getContentType() |
void | setContentType(String contentType) |
JSONObject | toJSON() |
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.
Updated 12 months ago