com.netmera.mobile
Class BasePush

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

public abstract class BasePush
extends java.lang.Object

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.


Nested Class Summary
static class BasePush.PushChannel
           
 
Constructor Summary
BasePush()
           
 
Method Summary
 java.util.List<java.lang.String> getDeviceGroups()
           
 java.lang.String getMessage()
           
abstract  void sendNotification()
           
 void sendRichPushGroups(java.lang.String message, java.lang.String richHtml, org.json.JSONObject clientJson, java.util.List<java.lang.String> deviceGroups)
           
 void setBoxPush(NetmeraGeoLocation firstPoint, NetmeraGeoLocation secondPoint)
          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)
          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)
           
 void setDeviceGroups(java.util.List<java.lang.String> deviceGroups)
           
 void setMessage(java.lang.String message)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasePush

public BasePush()
Method Detail

sendNotification

public abstract void sendNotification()
                               throws NetmeraException
Throws:
NetmeraException

setMessage

public void setMessage(java.lang.String message)
                throws NetmeraException
Throws:
NetmeraException

setDeviceGroups

public void setDeviceGroups(java.util.List<java.lang.String> deviceGroups)

setDeviceGroup

public void setDeviceGroup(java.lang.String deviceGroup)

getMessage

public java.lang.String getMessage()

getDeviceGroups

public java.util.List<java.lang.String> getDeviceGroups()

setCirclePush

public void setCirclePush(NetmeraGeoLocation startLocation,
                          double distance)
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)
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

sendRichPushGroups

public void sendRichPushGroups(java.lang.String message,
                               java.lang.String richHtml,
                               org.json.JSONObject clientJson,
                               java.util.List<java.lang.String> deviceGroups)
                        throws NetmeraException
Throws:
NetmeraException