public final class

SendUtils

extends Object
java.lang.Object
   ↳ mobisocial.omlib.sendable.SendUtils

Class Overview

A factory for creating various types of senable messages. Use send(Uri, Sendable) to send a message.

Summary

Public Constructors
SendUtils()
Public Methods
static CustomSendable createCustom(String type)
Creates an object with user-defined type.
static FileSendable createFile(Uri fileUri, String mimeType)
static Sendable createMiniclip(String video, String thumbnail)
static PictureSendable createPicture(Uri imageUri)
Creates a sendable picture object for a given resource.
static RdlSendable createRdl()

Creates a RDL (Rich Deep Link) sendable object.

static TextSendable createText(String text)
Creates a simple text message.
static Sendable createTextOrStory(OmletApi api, String text)
If the text represents a link, makes a network request to attempt to generate a 'story' sendable representing the web page.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SendUtils ()

Public Methods

public static CustomSendable createCustom (String type)

Creates an object with user-defined type. The type must be prefixed with "+" to avoid collisions with common obj types. Custom types are not rendered in a conversation.

public static FileSendable createFile (Uri fileUri, String mimeType)

public static Sendable createMiniclip (String video, String thumbnail)

public static PictureSendable createPicture (Uri imageUri)

Creates a sendable picture object for a given resource. The uri may be a local file, a content:// uri, or a web resource.

public static RdlSendable createRdl ()

Creates a RDL (Rich Deep Link) sendable object.

public static TextSendable createText (String text)

Creates a simple text message.

public static Sendable createTextOrStory (OmletApi api, String text)

If the text represents a link, makes a network request to attempt to generate a 'story' sendable representing the web page. If the request fails or the text is not a link, a TextSendable is returned.