public final class ImageMessage
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ImageMessage.Button
Description of an image message button.
|
static interface |
ImageMessage.PrepareListener |
Modifier and Type | Method and Description |
---|---|
static ImageMessage |
create(Engagement engagement)
Creates an Image Message from an Engagement once it has been populated
with response data after a successful request.
|
void |
prepare(ImageMessage.PrepareListener listener)
Prepares the Image Message for use, by downloading the image.
|
boolean |
prepared()
Gets the prepared state.
|
void |
show(android.app.Activity activity,
int requestCode)
Opens the
ImageMessageActivity for showing this Image Message. |
public boolean prepared()
true
if ready to use, else false
public void prepare(ImageMessage.PrepareListener listener)
listener
- the listener for receiving prepared statepublic void show(android.app.Activity activity, int requestCode)
ImageMessageActivity
for showing this Image Message.activity
- the Activity
from which the request is
being startedrequestCode
- the request code that will be used in
Activity.onActivityResult(int, int, Intent)
for the resultjava.lang.IllegalStateException
- if the Image Message is not prepared@Nullable public static ImageMessage create(Engagement engagement)
null
may be returned in case the Engagement was not set-up to
display an Image Message.
engagement
- the Engagement with response dataengagement
, else
null