public class

Message

extends Object
implements Parcelable
java.lang.Object
   ↳ com.ad4screen.sdk.Message

Class Overview

Inbox Message
Please see : Using Inbox in order to use it correctly

Summary

Nested Classes
class Message.Button Inbox Message Button
Please see : Using Inbox in order to use it correctly 
enum Message.MessageContentType Content Type of this Message. 
interface Message.onIconDownloadedListener Return bitmap associated with this image as soon as the image of this Message is downloaded on this Device. 
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<Message> CREATOR
Public Methods
int countButtons()
Total number of buttons in this message
int describeContents()
void display(Context context, Callback<Message> callback)
Display a message.
String getBody()
Body of this message
Message.Button getButton(int index)
Get a button at index
String getCategory()
Category of this message
Message.MessageContentType getContentType()
Content type of this message
void getIcon(Message.onIconDownloadedListener listener)
Download the Icon of this message and return the bitmap.
Date getSendDate()
Date when this message has been sended
String getSender()
Sender mail address
String getText()
Extract of this message
String getTitle()
Title of this message
String getUrlIcon()
Icons url of this message
boolean isArchived()
Is this message deleted on this device?
boolean isDownloaded()
Is the message downloaded.
boolean isOutdated()
Is the message expired
boolean isRead()
Is this message read
void setArchived(boolean archived)
Set this message as deleted or restored
void setRead(boolean read)
Set this message as read or unread
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<Message> CREATOR

Public Methods

public int countButtons ()

Total number of buttons in this message

public int describeContents ()

public void display (Context context, Callback<Message> callback)

Display a message. If the message is a text, the callback will be raised and you will get the complete message to display. In all other cases, AD4PUSH SDK will perform the correct action

Parameters
callback your callback to use in order to let you display the message if necessary

public String getBody ()

Body of this message

public Message.Button getButton (int index)

Get a button at index

public String getCategory ()

Category of this message

public Message.MessageContentType getContentType ()

Content type of this message

public void getIcon (Message.onIconDownloadedListener listener)

Download the Icon of this message and return the bitmap.

Returns
  • bitmap of this icon in onIconDownloaded method

public Date getSendDate ()

Date when this message has been sended

public String getSender ()

Sender mail address

public String getText ()

Extract of this message

public String getTitle ()

Title of this message

public String getUrlIcon ()

Icons url of this message

public boolean isArchived ()

Is this message deleted on this device?

Returns
  • true if the message is deleted

public boolean isDownloaded ()

Is the message downloaded. If not, you should not display it. In order to retrieve more message, please see getA4S.getNextMessages()

Returns
  • true if expired

public boolean isOutdated ()

Is the message expired

Returns
  • true if expired

public boolean isRead ()

Is this message read

Returns
  • true if read

public void setArchived (boolean archived)

Set this message as deleted or restored

public void setRead (boolean read)

Set this message as read or unread

public void writeToParcel (Parcel dest, int flags)