public class

CustomSendable

mobisocial.omlib.sendable.CustomSendable

Class Overview

A customizable data object. The type can be any stringthat is prefixed with PREFIX.

Summary

Constants
String PREFIX
Public Constructors
CustomSendable(String type)
Public Methods
CustomSendable setAttachmentUri(Uri attachmentUri)
Adds an attachment to this sendable.
CustomSendable setCallback(String callback)
CustomSendable setJsonMetadata(JSONObject json)
Attach json-encoded metadata to this object.
CustomSendable setMimeType(String mimeType)
CustomSendable setPayload(byte[] payload)
Append a small binary payload to this object.
CustomSendable setText(String text)
Sets a text component for this object.
CustomSendable setThumbnailUrl(String thumbnailUrl)
Adds a thumbnail to this sendable.

Constants

public static final String PREFIX

Constant Value: "+"

Public Constructors

public CustomSendable (String type)

Public Methods

public CustomSendable setAttachmentUri (Uri attachmentUri)

Adds an attachment to this sendable. The attachment will appear in the database under the field 'fileHash'. uriForBlob(Context, byte[]) can retrieve the attachment's content.

public CustomSendable setCallback (String callback)

public CustomSendable setJsonMetadata (JSONObject json)

Attach json-encoded metadata to this object.

public CustomSendable setMimeType (String mimeType)

public CustomSendable setPayload (byte[] payload)

Append a small binary payload to this object.

public CustomSendable setText (String text)

Sets a text component for this object.

public CustomSendable setThumbnailUrl (String thumbnailUrl)

Adds a thumbnail to this sendable. The image will appear in the database under the field 'thumbnailHash', with thumbnailWidth and thumbnailHeight indicating its size. uriForBlob(Context, byte[]) can retrieve the image data.