public class PushContent extends Object
PushCallback.push(java.lang.String)
 method to retrieve details of the push, including title, body, image URL, category, type, and metadata if available.| Modifier and Type | Method and Description | 
|---|---|
static boolean | 
exists()
Checks if there is pending push content to retrieve. 
 | 
static PushContent | 
get()
Gets the most recent push notification content if it exists. 
 | 
String | 
getActionId()
If the user selected an action on the push notification, then the ID of the selected action will be stored in the PushContent's
 actionId. 
 | 
String | 
getBody()
Gets the body of the push content. 
 | 
String | 
getCategory()
Gets category of the push content. 
 | 
String | 
getImageUrl()
Gets the image URL of the push content. 
 | 
String | 
getMetaData()
Gets the metadata associated with push. 
 | 
String | 
getTextResponse()
If the push notification action included a text field for the user to enter a response, then that response
 will be returned here. 
 | 
String | 
getTitle()
Gets the title of the Push content. 
 | 
int | 
getType()
Gets the type of the push content. 
 | 
static void | 
reset()
Resets the push content. 
 | 
static void | 
setActionId(String actionId)
Deprecated. 
 
For internal use only. 
 | 
static void | 
setBody(String body)
Deprecated. 
 
For internal use only 
 | 
static void | 
setCategory(String category)
Deprecated. 
 
For internal use only. 
 | 
static void | 
setImageUrl(String imageUrl)
Deprecated. 
 
For internal use only. 
 | 
static void | 
setMetaData(String metaData)
Deprecated. 
 
For internal use only. 
 | 
static void | 
setTextResponse(String textResponse)
Deprecated. 
 
For internal use only. 
 | 
static void | 
setTitle(String title)
Deprecated. 
 
For internal use only. 
 | 
static void | 
setType(int type)
Deprecated. 
 
For internal use only. 
 | 
public static boolean exists()
public static PushContent get()
 if (PushContent.exists()) {
     PushContent content = PushContent.get();
        // content should be non-null
     PushContent content2 = PushContent.get();
        // content2 should be null
     PushContent.exists(); // false
 }
 
 
public static void reset()
exists() will return false.public String getTitle()
public static void setTitle(String title)
title - the title to setpublic String getBody()
public static void setBody(String body)
body - the body to setpublic String getImageUrl()
public static void setImageUrl(String imageUrl)
imageUrl - the imageUrl to setpublic String getCategory()
public static void setCategory(String category)
category - the category to setpublic String getMetaData()
public static void setMetaData(String metaData)
metaData - the metaData to setpublic int getType()
public static void setType(int type)
type - the type to setpublic String getActionId()
PushActionsProvider, 
PushActionCategory, 
PushActionpublic String getTextResponse()
PushActionsProvider, 
PushActionCategory, 
PushAction, 
PushAction.getTextInputButtonText(), 
PushAction.getTextInputPlaceholder()public static void setActionId(String actionId)
actionId - The ID of the action that was selected by the user.PushActionsProvider, 
PushActionCategory, 
PushActionpublic static void setTextResponse(String textResponse)