ICAudioAttachment

Represents an audio file attachment.

fromJSON

Instantiates a new ICAudioAttachment instance from the supplied JSONObject.

The JSONObject must contain valid audio attachment data.

  Syntax: static ICAudioAttachment fromJSON(JSONObject jsonObj)

  Return Value: A new ICAudioAttachment or null if jsonObj is null.

  Parameters:

ParameterTypeDescription
jsonObjJSONObjectA valid JSONObject instance containing audio attachment data.

getDuration

Returns the audio attachment duration, in seconds.

  Syntax: long getDuration()

  Return Value: The audio attachment duration, in seconds.

setDuration

Sets the audio attachment duration, in seconds.

  Syntax: void setDuration(long duration)

  Parameters:

ParameterTypeDescription
durationintSpecifies the duration in seconds.