Within imiconnect, all In-App messages are compartmentalized into logical threads of conversation. The ICThread class is the local representation of thread data within the imiconnect SDK.

Threads can be managed via the SDK using the methods exposed by the ICMessaging class and support data attributes such as title, category, status, and extras.

Before messages can be published from the SDK a thread must be provisioned within the imiconnect platform via ICMessaging.createThread or via the web APIs.

When replying to an existing thread, obtain an ICThread instance from an incoming ICMessage or from the ICMessaging.fetchThreads method.


Instantiates an ICThread instance from a JSONObject. The JSONObject must contain valid thread data.

  Syntax: static ICThread fromJSON(JSONObject jsonObj)

  Return Value: A new ICThread instance. Returns null if jsonObj is null.


jsonObjJSONObjectA JSONObject instance containing valid thread data.


Gets the thread category.

  Syntax: String getCategory()

  Return Value: The thread category.


Gets the date on which the thread was created within the imiconnect platform.

  Syntax: Date getCreatedAt()

  Return Value: The thread creation date.


Gets the external id associated with the thread. An external id is a value that may be used to associate the thread with an entity in an external system.

  Syntax: String getExternalId()

  Return Value: The external id, if present, otherwise null.


Returns a bundle of any extra data associated with the thread. Extras may be used to associate custom data with a thread.

  Syntax: Bundle getExtras()

  Return Value: Extra data elements associated to the thread, or null if none exists.


Gets the unique identifier of the thread. This value is generated by the imiconnect platform when the thread is provisioned.

  Syntax: String getId()

  Return Value: The thread id.


Returns the status of the thread. See ICThreadStatus for possible values.

  Syntax: ICThreadStatusgetStatus()

  Return Value: The threads current status.


Returns the title of the thread.

  Syntax: String getTitle()

  Return Value: The thread title.


Returns the type of thread. See ICThreadType for possible options.

  Syntax: ICThreadType getType()

  Return Value: Returns the thread type.


Returns the date on which the thread was last updated. Changes to thread data, or publication of messages on the thread, will affect this date.

  Syntax: Date getUpdatedAt()

  Return Value: The date the thread was last updated.


Sets the category thread.

  Syntax: void setCategory(String category)


categoryStringCategory of the thread.


Sets the external id value. External ids can be used to associate a thread with an entity in an external system.

  Syntax: void setExternalId(String externalId)


externalIdStringThe external id value


Sets extra data to be associated with the thread.

  Syntax: void setExtras(Bundle extras)


ExtrasBundleThe extra data


Sets the thread title.

  Syntax: void setTitle(String title)

titleStringTitle of the thread.


Returns a JSON representation of the thread.

  Syntax: JSONObject toJSON()

  Return Value: Thread data as a JSONObject