com.netmera.mobile
Class BasePush

java.lang.Object
  extended by com.netmera.mobile.BasePush
Direct Known Subclasses:
NetmeraAndroidPush, NetmeraIOSPush, NetmeraPush

Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. BasePush class is an abstract class to implement different channel notifications like NetmeraIOSPush, NetmeraAndroidPush and NetmeraPush By the help of these classes push notifications can be send different channels.

@Deprecated
public abstract class BasePush
extends java.lang.Object


Constructor Summary
BasePush()
          Deprecated.  
 
Method Summary
 void addDeviceGroup(java.lang.String deviceGroup)
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Adds a device group to the device group list.
 java.util.List<java.lang.String> getDeviceGroups()
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Use to get device groups that the notification will be sent.
 java.lang.String getMessage()
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Get push notification message
 org.json.JSONObject getParameter()
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Get parameter (custom data) on the notification.
abstract  void sendNotification()
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification.
 void setBoxPush(NetmeraGeoLocation firstPoint, NetmeraGeoLocation secondPoint)
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Creates box using the given two location (latitude,longitude) data in order to send push notifications to devices registered inside that box.
 void setCirclePush(NetmeraGeoLocation startLocation, double distance)
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Creates a circle by taking given location as a base and the distance as the radius in order to send push notifications to devices registered inside that circle.
 void setDeviceGroup(java.lang.String deviceGroup)
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Set device group with just one device group. If there is any device group in the list before calling this method, they will be deleted.
 void setDeviceGroups(java.util.List<java.lang.String> deviceGroups)
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Use to specify which device groups you want to send this notification.
 void setMessage(java.lang.String message)
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. sets notification message
 void setParameter(org.json.JSONObject parameter)
          Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Set parameters on the notification. You can check Android Guide for info about how to use this data. The size of the data on a notification should not exceed 4kb.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasePush

public BasePush()
Deprecated. 
Method Detail

sendNotification

public abstract void sendNotification()
                               throws NetmeraException
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification.

Throws:
NetmeraException - if no platform is chosen. You should set either sendToAndroid or sendToIos to true.

setMessage

public void setMessage(java.lang.String message)
                throws NetmeraException
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. sets notification message

Parameters:
message - notification message
Throws:
NetmeraException - if message is empty or message length is greater than 180 characters.

setDeviceGroups

public void setDeviceGroups(java.util.List<java.lang.String> deviceGroups)
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Use to specify which device groups you want to send this notification.

Parameters:
deviceGroups - list of device groups

setDeviceGroup

public void setDeviceGroup(java.lang.String deviceGroup)
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Set device group with just one device group. If there is any device group in the list before calling this method, they will be deleted.

Parameters:
deviceGroup - a device group

addDeviceGroup

public void addDeviceGroup(java.lang.String deviceGroup)
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Adds a device group to the device group list.

Parameters:
deviceGroup -

getMessage

public java.lang.String getMessage()
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Get push notification message

Returns:
push notification message

getDeviceGroups

public java.util.List<java.lang.String> getDeviceGroups()
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Use to get device groups that the notification will be sent.

Returns:
deviceGroups

getParameter

public org.json.JSONObject getParameter()
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Get parameter (custom data) on the notification.

Returns:
push parameters

setParameter

public void setParameter(org.json.JSONObject parameter)
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Set parameters on the notification. You can check Android Guide for info about how to use this data. The size of the data on a notification should not exceed 4kb.

Parameters:
parameter - notification parameters

setCirclePush

public void setCirclePush(NetmeraGeoLocation startLocation,
                          double distance)
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Creates a circle by taking given location as a base and the distance as the radius in order to send push notifications to devices registered inside that circle.

Parameters:
startLocation - base location to search near it.
distance - is used to create circle by taking the startLocation as a center.

setBoxPush

public void setBoxPush(NetmeraGeoLocation firstPoint,
                       NetmeraGeoLocation secondPoint)
Deprecated. use NetmeraPushObject to create push notifications. After preparing, use NetmeraPushSender to send this notification. Creates box using the given two location (latitude,longitude) data in order to send push notifications to devices registered inside that box.

Parameters:
firstPoint - NetmeraGeoLocation object
secondPoint - NetmeraGeoLocation object