public class Notification
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Notification.ActionType |
static class |
Notification.Key
Contains all predefined keys of
getActionData() map. |
static class |
Notification.NotificationType |
static class |
Notification.Type
Deprecated.
Use
Notification.ActionType constants. |
Constructor and Description |
---|
Notification(java.lang.String id,
boolean wasRead,
int type,
long createdAt,
java.lang.String title,
java.lang.String text,
int actionType,
java.util.Map<java.lang.String,java.lang.String> actionData)
Create notification object.
|
Modifier and Type | Method and Description |
---|---|
Notification.Type |
getAction()
Deprecated.
Use
getActionType() instead. |
java.util.Map<java.lang.String,java.lang.String> |
getActionData()
Map of action data passed with notifications.
|
int |
getActionType()
Action to be done on notification click.
|
long |
getCreatedAt()
Date of notification creation.
|
java.lang.String |
getId()
Get the unique notification identifier.
|
java.lang.String |
getText()
Text of notification.
|
java.lang.String |
getTitle()
Title of notification.
|
int |
getType()
One of the constants in
Notification.NotificationType . |
java.lang.String |
toString() |
boolean |
wasRead()
Return was notification read by user or not.
|
public Notification(java.lang.String id, boolean wasRead, int type, long createdAt, java.lang.String title, java.lang.String text, int actionType, java.util.Map<java.lang.String,java.lang.String> actionData)
id
- unique notification identified.wasRead
- was notification read or not.type
- type of notification.title
- notification title.text
- notification text.actionType
- notification action to be executed.actionData
- custom action data passed along with the notification.public java.lang.String getTitle()
public java.lang.String getText()
@Deprecated public Notification.Type getAction()
getActionType()
instead.Notification.Type
.public int getActionType()
Notification.ActionType
.public java.util.Map<java.lang.String,java.lang.String> getActionData()
Notification.Key
.public java.lang.String getId()
public boolean wasRead()
public int getType()
Notification.NotificationType
.public long getCreatedAt()
public java.lang.String toString()
toString
in class java.lang.Object
(c) Copyright GetSocial BV, 2018. All Rights Reserved.