com.netmera.mobile
Class NetmeraPushObject

java.lang.Object
  extended by com.netmera.mobile.NetmeraPushObject
Direct Known Subclasses:
NetmeraRichPushObject

public class NetmeraPushObject
extends java.lang.Object

NetmeraPushObject is the main Push object in Netmera. With the help of this class, you will be able to control basic push notification features.


Nested Class Summary
static class NetmeraPushObject.NotificationType
          Available notification types of the incoming or created push notification object.
 
Constructor Summary
NetmeraPushObject()
           
 
Method Summary
 java.util.Date getCreateDate()
          Get create date of the incoming push notification.
 java.util.Map<java.lang.String,java.lang.String> getCustomData()
          Get custom pay load data which is sent with the notification.
 java.lang.String getMessage()
          Get the plain message of the push notification
 java.lang.String getNotificationId()
          Get the notification ID which is used to describe a notification in Netmera.
 java.lang.String getPushType()
          Get push type of the incoming notification.
 java.lang.String getTitle()
          Get the push title of the incoming push notification.
 boolean isBackgroundPush()
           
 NetmeraPushObject putCustomData(java.lang.String key, java.lang.String value)
          Put custom data to your push notification.
 void setBackgroundPush(boolean isBackgroundPush)
           
 NetmeraPushObject setCustomData(java.util.Map<java.lang.String,java.lang.String> customData)
          Set custom data when sending a push notification.
 NetmeraPushObject setMessage(java.lang.String message)
          Set the plain message of the push notification.
 NetmeraPushObject setTitle(java.lang.String title)
          Set a title to your push when you send a notification from device.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetmeraPushObject

public NetmeraPushObject()
Method Detail

isBackgroundPush

public boolean isBackgroundPush()

setBackgroundPush

public void setBackgroundPush(boolean isBackgroundPush)

getMessage

public java.lang.String getMessage()
Get the plain message of the push notification

Returns:
message which appears in the notification bar.

setMessage

public NetmeraPushObject setMessage(java.lang.String message)
Set the plain message of the push notification.

Parameters:
message - which will appear in the notification bar.

getCreateDate

public java.util.Date getCreateDate()
Get create date of the incoming push notification.

Returns:
create date

getCustomData

public java.util.Map<java.lang.String,java.lang.String> getCustomData()
Get custom pay load data which is sent with the notification.

Returns:
custom data map that holds key-value pairs.

setCustomData

public NetmeraPushObject setCustomData(java.util.Map<java.lang.String,java.lang.String> customData)
Set custom data when sending a push notification.

Parameters:
customData - key value pairs to send with the notification.

putCustomData

public NetmeraPushObject putCustomData(java.lang.String key,
                                       java.lang.String value)
Put custom data to your push notification.

Parameters:
key - custom data key
value - custom data value

getNotificationId

public java.lang.String getNotificationId()
Get the notification ID which is used to describe a notification in Netmera.

Returns:
notificationId string

getPushType

public java.lang.String getPushType()
Get push type of the incoming notification. The type can be RICH or STANDARD. To compare, you can use statics on NetmeraPushObject.NotificationType class.

Returns:
pushType

getTitle

public java.lang.String getTitle()
Get the push title of the incoming push notification.

Returns:
title

setTitle

public NetmeraPushObject setTitle(java.lang.String title)
Set a title to your push when you send a notification from device.

Parameters:
title - push title